SHA-256 to get AES KeyWrap key?

Issue #828 resolved
Brian Campbell created an issue

I know this is a PITA but the use of left truncated SHA-256 hash to get the symmetric encryption key isn't particularity cryptographically agile.

It is sufficient for what's currently defined (A128KW & A256KW) but the text below couldn't accommodate algorithms needing keys larger that 256bits and seems like it precludes anything but AES based key wrapping. I dunno, maybe that's okay. But I felt like I should raise it.

http://openid.net/specs/openid-connect-messages-1_0-16.html#enc "Symmetric Encryption The symmetric encryption key is derived from the client_secret value by using a left truncated SHA-256 hash of the bytes of the UTF-8 representation of the client_secret. The SHA-256 value MUST be left truncated to the appropriate bit length for the AES KeyWrap algorithm used, for instance, to 128 bits for A128KW. "

Comments (2)

  1. Log in to comment