identity/identity
library
Functions
-
bufEquals(ByteBuffer b1, ByteBuffer b2)
→ bool
-
-
bytesUnwrapDer(Uint8List derEncoded, Uint8List oid)
→ Uint8List
-
Extracts a payload from the given
derEncoded
data, and checks that it was
tagged with the given oid
.
-
bytesUnwrapDerSignature(Uint8List derEncoded)
→ Uint8List
-
ECDSA DER Signature
0x30|b1|0x02|b2|r|0x02|b3|s
b1 = Length of remaining data
b2 = Length of r
b3 = Length of s
-
bytesWrapDer(Uint8List payload, Uint8List oid)
→ Uint8List
-
Wraps the given
payload
in a DER encoding tagged with the given encoded
oid
like so: SEQUENCE(oid, BITSTRING(payload))
-
bytesWrapDerSignature(Uint8List rawSignature)
→ Uint8List
-
-
decodeLenBytes(Uint8List buf, int offset)
→ int
-
-
derive(Uint8List parentKey, Uint8List parentChaincode, int i)
→ Set<Uint8List>
-
-
dropLeadingUserNumber(String s)
→ String
-
-
encodeLen(Uint8List buf, int offset, int len)
→ int
-
-
encodeLenBytes(int len)
→ int
-
-
-
fromMnemonicWithoutValidation(String mnemonic, List<int>? derivationPath, {int offset = hardened})
→ Future<Ed25519KeyIdentity>
-
Create an Ed25519 based on a mnemonic phrase according to SLIP 0010:
https://github.com/satoshilabs/slips/blob/master/slip-0010.md
-
fromSeedWithSlip0010(Uint8List masterSeed, List<int>? derivationPath, {int offset = hardened})
→ Future<Ed25519KeyIdentity>
-
Create an Ed25519 according to SLIP 0010:
https://github.com/satoshilabs/slips/blob/master/slip-0010.md
-
generateMasterKey(Uint8List seed)
→ Set<Uint8List>
-
-
getECShareSecret(Uint8List privateKey, Uint8List rawPublicKey)
→ Future<Uint8List>
-
-
getP256ShareSecret(Uint8List privateKey, Uint8List rawPublicKey)
→ Future<Uint8List>
-
-
isDerPublicKey(Uint8List pub, Uint8List oid)
→ bool
-
-
isDerSignature(Uint8List sig)
→ bool
-
-
parseUserNumber(String s)
→ BigInt?
-
BigInt parses various things we do not want to allow, like:
-
recoverSecp256k1PubKey(Uint8List preHashedMessage, Uint8List signature)
→ Future<Uint8List>
-
-
signP256Async(Uint8List blob, Uint8List seed)
→ Future<Uint8List>
-
-
signSchnorrAsync(Uint8List blob, Uint8List seed, {Uint8List? auxRand})
→ Future<Uint8List>
-
-
signSecp256k1(String message, BinaryBlob secretKey)
→ Uint8List
-
-
signSecp256k1Async(Uint8List blob, Uint8List seed)
→ Future<Uint8List>
-
-
signSecp256k1Recoverable(Uint8List blob, Uint8List seed)
→ Future<Uint8List>
-
-
signSecp256k1WithRNG(Uint8List blob, Uint8List bytes)
→ Future<Uint8List>
-
-
toBigEndianArray(int n)
→ Uint8List
-
Converts a 32-bit unsigned integer to a big endian byte array.
-
verifyP256Async(Uint8List blob, Uint8List signature, P256PublicKey publicKey)
→ Future<bool>
-
-
verifySchnorrAsync(Uint8List blob, Uint8List signature, SchnorrPublicKey publicKey)
→ Future<bool>
-
-
verifySecp256k1(String message, Uint8List signature, Secp256k1PublicKey publicKey)
→ bool
-
-
verifySecp256k1Blob(Uint8List blob, Uint8List signature, Secp256k1PublicKey publicKey)
→ bool
-