AlphaHive On-Chain Signatures Verification in Move
Move contracts in AlphaHive support verifications for several signature schemes on-chain. Not all signatures supported in on-chain verification are supported as user signature verification.
This topic covers:
How to use fastcrypto's CLI tool to create a signature of a given scheme. For testing and debugging only, DO NOT use in production.
Call the AlphaHive method on-chain to verification by submitting the signature, the message and the public key.
Signature schemes covered:
Ed25519 signature (64 bytes)
Secp256k1 non-recoverable signature (64 bytes)
Secp256k1 recoverable signature (65 bytes)
Secp256r1 non-recoverable signature (64 bytes)
Secp256r1 recoverable signature (65 bytes)
BLS G1 signature (minSig setting)
BLS G2 signature (minPk setting)
Usageβ
Set up fastcrypto CLI binaryβ
git clone git@github.com:MystenLabs/fastcrypto.git
cd fastcrypto/
cargo build --bin sigs-cliSign with CLI and submit to on-chain Move methodβ
Ed25519 signature (64 bytes)β
Generate a key and sign a message.
Call the verify method in Move. All inputs are represented in bytes in hex format:
Secp256k1 non-recoverable signature (64 bytes)β
Generate a key and sign a message.
Call the verify method in Move.
Secp256k1 recoverable signature (65 bytes)β
Generate a key and sign a message.
Call the ecrecover method in Move and check equality.
Secp256r1 non-recoverable signature (64 bytes)β
Generate a key and sign a message.
Call the verify method in Move.
Secp256r1 recoverable signature (65 bytes)β
Generate a key and sign a message.
Call the ecrecover method in Move and check equality.
BLS G1 signature (48 bytes, minSig setting)β
Generate a key and sign a message.
Call the verify method in Move.
BLS G1 signature (96 bytes, minPk setting)β
Generate a key and sign a message.
Call the verify method in AlphaHive.
Last updated