Digital Signature Algorithm (DSA)
DSA is an algorithm for asymmetric key cryptography, defined as a United States Federal Government standard for digital signatures.
Algorithm | Meaning |
---|---|
DSA_SHA1
|
Digital Signature Algorithm with SHA-1 hash function |
DSA_SHA224
|
Digital Signature Algorithm with SHA-224 hash function |
DSA_SHA256
|
Digital Signature Algorithm with SHA-256 hash function |
DSA_SHA384
|
Digital Signature Algorithm with SHA-384 hash function |
DSA_SHA512
|
Digital Signature Algorithm with SHA-512 hash function |
Signing Messages
Sign a message by DSA with SHA-256 hash:
vSignature = "" vMessage = "This is scret data." vSignature = $encode("DSA_SHA256", vMessage, vMyPrivateKey)
Verifying Messages
Verify the signed message:
if ($decode("DSA_SHA256", vMessage, vMyPublicKey, vSignature)) message/info "This is a valid message." else message/info "Signature doesn’t match with the message." endif