Using symmetric key (AES -128) to sign and verify a message

后端 未结 3 929
南方客
南方客 2021-02-08 15:37

I want to know can symmetric keys be used to sign a message ? We can encrpyt using the shared secret key. Also when symmetric key is used for signing , what API can be used in J

3条回答
  •  说谎
    说谎 (楼主)
    2021-02-08 16:13

    A shared secret key can be used to calculate a Message Authentication Code (MAC), which then can be used to confirm the integrity and authenticity of the message to another party which knows the same shared secret. Unlike digital signatures, which are created using the private key and verified using the public key, MACs do not offer non-repudiation (anyone who can verify the MAC can also generate a MAC for another message).

    There are different forms of message authentication codes; probably the most often used variation is HMAC.

提交回复
热议问题