-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Looks like I'm on double secret probation again (-:
It's working as expected for my code. - -- - - m&m Matt Miller < [email protected] > Cisco Systems, Inc. On 5/6/14, 10:53 PM, Brian Campbell wrote: > Thanks Matt. > > That is why I was looking for someone to verify using a different > platform. Though I was hoping it'd just work. > > Matt, can you try decrypting this one by chance? Using the same > key. I was more explicit with the parameters and, I think, MGF1 > should be using SHA-256 now too. > > eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0.fL5IL5cMCjjU9G9_ZjsD2XO0HIwTOwbVwulcZVw31_rx2qTcHzbYhIvrvbcVLTfJzn8xbQ3UEL442ZgZ1PcFYKENYePXiEyvYxPN8dmvj_OfLSJDEqR6kvwOb6nghGtxfzdB_VRvFt2eehbCA3gWpiOYHHvSTFdBPGx2KZHQisLz3oZR8EWiZ1woEpHy8a7FoQ2zzuDlZEJQOUrh09b_EJxmcE2jL6wmEtgabyxy3VgWg3GqSPUISlJZV9HThuVJezzktJdpntRDnAPUqjc8IwByGpMleIQcPuBUseRRPr_OsroOJ6eTl5DuFCmBOKb-eNNw5v-GEcVYr1w7X9oXoA.0frdIwx8P8UAzh1s9_PgOA.RAzILH0xfs0yxzML1CzzGExCfE2_wzWKs0FVuXfM8R5H68yTqTbqIqRCp2feAH5GSvluzmztk2_CkGNSjAyoaw.4nMUXOgmgWvM-08tIZ-h5w > > > > On Tue, May 6, 2014 at 8:39 PM, Matt Miller <[email protected] > <mailto:[email protected]>> wrote: > > Short answer: You are all equally broken -- except from a certain > point of view d-: > > Long answer: The code I have is based on OpenSSL, which is > hard-coded to use SHA1 for the hash and mask generation (boo!), > which means one has to implement OAEP-SHA256 from scratch > (hiss!!). > > When I implemented it per RFC 3447 and > draft-ietf-jose-json-web-algorithms-26#section-4.3, I could not > decrypt the provided results. When I hard-coded MGF1 to use > "SHA1", I could decrypt provided results. A search through > BouncyCastle's code shows that > "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" uses a Hash function of > SHA-256 generate the lHash but its MGF1 uses a "SHA-1". Further > evidence is shown with how [FORGE] can be made to work with Java > (search their homepage for "Compatible with Java's > RSA/ECB/OAEPWithSHA-256AndMGF1Padding"). > > Reconciling all of this with > draft-ietf-jose-json-web-algorithms#appendix-A.2 does not look to > be very straight-forward. It appears that the JCA identifier is > meant to be "MGF1 with SHA1"; that ought to be explicitly noted. > The XMLENC reference is arguably incomplete, since > "http://www.w3.org/2009/xmlenc11#rsa-oaep" defaults to > "http://www.w3.org/2009/xmlenc11#mgf1sha1" (MGF1 with SHA1); this > can probably be addressed by explicitly stating the mask > generation function is "http://www.w3.org/2009/xmlenc11#mgf1sha256" > (MGF1 with SHA-256). > > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCgAGBQJTaiWFAAoJEDWi+S0W7cO1008H/27io3RSL9QCvipxXFL4rmLu BqP3ZhUYwlbbzz0tA09iPE91EoanY6mKgCK0O0PJrUCIGl97M8fzZt9lwtv2jzCk W0uhE03M8mClIcMzubmIUFWntsM0ItyvFgHAlroIPbMX4gWMnEI+4qidITV/rQuL 3u/WXtpcafVWMfzlTZfqP5sws8iYXyicSQqtrZ4YXGNqVw5uSogOnt93QgY7Deyb UZJkVa6Ax2K844Smz4YEySwMLO91MeW27EHmFu6L1Kyer/NOedvdbMGIxsHKUJ+o /lXQWUF5ZqhB/Zsg25VtGYL1CVp00lHDlBq+riiyrtbcNNdquHvXngV3pVAnt2s= =/ujW -----END PGP SIGNATURE----- _______________________________________________ jose mailing list [email protected] https://www.ietf.org/mailman/listinfo/jose
