[Openid-specs-ab] jwe aes gcm in java

Axel.Nennker at telekom.de Axel.Nennker at telekom.de
Wed Nov 2 16:08:27 UTC 2011


Mike,

I implemented AESGCM in Java. The parameters for my example are:

The keybytes are: byte[] N = Hex.decode("cafebabefacedbaddecaf888");
The jweHeader is: {"alg":"A128GCM","iv":"yv66vvrO263eyviI"}

AESGCM jwtHeaderSegment base64:  eyJhbGciOiJBMTI4R0NNIiwiaXYiOiJ5djY2dnZyTzI2M2V5dmlJIn0
AESGCM jwtCryptoSegment base64:  H7I-QNvM8VtMylQfBbbqyrT8xiFcVv-7CZTn-dkXr10dpIOmzjMbqjmbqevK2aAoRu4s5DhU8dbeu8SbRJTCDYYAkYfOo_Hc5NY6B5-VwhnOWc0sres

Result JWE:  eyJhbGciOiJBMTI4R0NNIiwiaXYiOiJ5djY2dnZyTzI2M2V5dmlJIn0.H7I-QNvM8VtMylQfBbbqyrT8xiFcVv-7CZTn-dkXr10dpIOmzjMbqjmbqevK2aAoRu4s5DhU8dbeu8SbRJTCDYYAkYfOo_Hc5NY6B5-VwhnOWc0sres

The code is here:
http://code.google.com/p/openinfocard/source/browse/trunk/src/org/xmldap/json/WebToken.java
The JUNIT tests are here:
http://code.google.com/p/openinfocard/source/browse/trunk/testsrc/org/xmldap/json/WebTokenTest.java

Maybe you could verify my example with your F# code.
Rob: Could you please check with your php?

Cheers
Axel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openid.net/pipermail/openid-specs-ab/attachments/20111102/f38a2131/attachment.html>


More information about the Openid-specs-ab mailing list