Go to the first, previous, next, last section, table of contents.


|signedDigestCheck

Function: |signedDigestCheck { [msg-plus-signature] secret -> [message-plus-badsig] }
file: job.t
package: muf
status: alpha

This function is complementary to |signedDigest: It checks whether the signature on the message is correct, then replaces the signature with a flag value which is nil if the signature was correct, else non-nil. The secret argument must be a #<DiffieHellmanSharedSecret>.

Stack:
dh:g dh:p generateDiffieHellmanKeyPair --> publicKey1 --> privateKey1
Stack:
dh:g dh:p generateDiffieHellmanKeyPair --> publicKey2 --> privateKey2
Stack:
publicKey1 privateKey2 dh:p generateDiffieHellmanSharedSecret --> sharedSecret1
Stack:
publicKey2 privateKey1 dh:p generateDiffieHellmanSharedSecret --> sharedSecret2
Stack:
[ 'a' 'b' 'c' | sharedSecret1
Stack: [ 'a' 'b' 'c' | #<DiffieHellmanSharedSecret>
|signedDigest ( Exact signature bytes will of course vary randomly: )
Stack: [ 'a' 'b' 'c' '\251' '\231' '>' '6' 'G' '\006' '\201' 'j' '\272' '>' '%' 'q' 'x' 'P' '\302' 'l' '\234' '\320' '\330' '\235' |
sharedSecret2 |signedDigestCheck
Stack: [ 'a' 'b' 'c' nil |

See section hash. See section |secureHash. See section |secureDigest. See section secureHash. See section secureHashBinary. See section secureHashFixnum.


Go to the first, previous, next, last section, table of contents.