-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add forging of BLS keys and signature, scaffold for BLS curve
- Loading branch information
Showing
13 changed files
with
101 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
|
||
namespace Netezos.Keys | ||
{ | ||
class Bls12381 : Curve | ||
{ | ||
public override ECKind Kind => ECKind.Bls12381; | ||
|
||
public override byte[] AddressPrefix => Prefix.tz4; | ||
public override byte[] PublicKeyPrefix => Prefix.BLpk; | ||
public override byte[] PrivateKeyPrefix => Prefix.BLsk; | ||
public override byte[] SignaturePrefix => Prefix.BLsig; | ||
public override byte[] SeedKey => throw new NotImplementedException("BLS12-381 curve is not implemented yet"); | ||
|
||
public override byte[] GeneratePrivateKey() | ||
{ | ||
throw new NotImplementedException("BLS12-381 curve is not implemented yet"); | ||
} | ||
|
||
public override byte[] GetPublicKey(byte[] privateKey) | ||
{ | ||
throw new NotImplementedException("BLS12-381 curve is not implemented yet"); | ||
} | ||
|
||
public override Signature Sign(byte[] msg, byte[] prvKey) | ||
{ | ||
throw new NotImplementedException("BLS12-381 curve is not implemented yet"); | ||
} | ||
|
||
public override bool Verify(byte[] msg, byte[] sig, byte[] pubKey) | ||
{ | ||
throw new NotImplementedException("BLS12-381 curve is not implemented yet"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ public enum ECKind | |
{ | ||
Ed25519 = 1, | ||
Secp256k1 = 2, | ||
NistP256 = 3 | ||
NistP256 = 3, | ||
Bls12381 = 4 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters