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]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > 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). > > > - -- > - - m&m > > Matt Miller < [email protected] > > Cisco Systems, Inc. > > [FORGE] Forge < https://github.com/digitalbazaar/forge > > > On 5/6/14, 8:00 AM, Brian Campbell wrote: > > But you probable did do something very similar to what I did in > > jose4j - i.e. just getting a cipher instance with > > "RSA/ECB/OAEPWithSHA-256AndMGF1Padding"? > > > > I think that's the right thing to do (and JWA even implies it) but > > a check from a different language/platform would help verify that > > assumption. I don't know if maybe more specifics need to be > > provided to the cipher via OAEPParameterSpec or something - the JCA > > APIs can be a bit mysterious at times. > > > > > > On Tue, May 6, 2014 at 6:32 AM, Antonio Sanso <[email protected] > > <mailto:[email protected]>> wrote: > > > > hi Brian, > > > > > > On May 6, 2014, at 3:29 PM, Brian Campbell > > <[email protected] <mailto:[email protected]>> > > wrote: > > > >> From the venerable film Animal House, of course, > >> https://www.youtube.com/watch?v=vVXEQ8hjyGI > >> > >> Thanks for checking that Antonio. > >> > >> Hopefully we could get a non Java based implementing to verify it > >> too. > > > > just for completeness I did *not* use jose4j to verify it… (just > > to be safe) > > > > regards > > > > antonio > > > >> > >> > >> > >> > >> On Tue, May 6, 2014 at 6:25 AM, Antonio Sanso <[email protected] > >> <mailto:[email protected]>> wrote: > >> > >> Well, as of this moment, they're on DOUBLE SECRET PROBATION! > >> > >> On May 6, 2014, at 11:34 AM, Antonio Sanso <[email protected] > >> <mailto:[email protected]>> wrote: > >> > >>> Hi Brian, > >>> > >>> I will give a try and let you know > >>> > >>> regards > >>> > >>> antonio > >>> > >>> On May 6, 2014, at 5:40 AM, Brian Campbell > >>> <[email protected] > >>> <mailto:[email protected]>> wrote: > >>> > >>>> The latest revision of JWA added a new 'RSA-OAEP-256' JWE alg > >>>> for key encryption but, AFAIK, there are no examples using > >>>> it. I recently added support for it to > >>>> https://bitbucket.org/b_c/jose4j and am looking to get some > >>>> kind of confirmation that I've done it correctly (other than > >>>> self interop). With that in mind, here is a JWE using > >>>> RSA-OAEP-256 which I've produced and I'm hopeful that someone > >>>> on this WG list will be able to decrypt. The RSA key that was > >>>> used (in JWK format with both public and private parts) is > >>>> below the JWE. > >>>> > >>>> > eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0.Oyeg4hbq2HjtHOcXduK9UhhIXervPzOTLAqKphCyeK55cFgKtF32DhD26sfnG6h9az3Ogrn4QwYJeZkjJK36teyjl9oKIW_9ItP8cYhOriDOOZFho53Bsttqj8pc0UPrMJ448yQsgkgyqmfWZQs3u_qCaSLXpegE3o-YJ520-Xu_ElS5pNy_vfSME1CeP5unPQPf06Xc6iMVWx9-K_7lxC7acYI_fSSUwuFw-vxrVJMRKf0NDikdmcoI5WW7h5gLXSu4EZvW8xHxA_QoEFnSeYgg8NQNOGLf_PaBddAdn8ck_mhtJdgfc0W251nTviMAwPAjsG0FMnPox7GdtzTdmA.3DJSCmGDd9WI-DI3sBRm8Q.ncFI9vUEdKkuhPR0h3nOJP5dBgKrcS5f9Q7Z58AZTTdTV53FlzJIHwdme-1xipwDifTOL8yi7beuEEiXg_CSzw.UmNlvrfeCGnhWT9qyuUSSA > >>>> > >>>> > >>>> > > {"kty":"RSA","n":"2cQJH1f6yF9DcGa8Cmbnhn4LHLs5L6kNb2rxkrNFZArJLRaKvaC3tMCKZ8ZgIpO9bVMPx5UMjJoaf7p9O5BSApVqA2J10fUbdSIomCcDwvGo0eyhty0DILLWTMXzGEVM3BXzuJQoeDkuUCXXcCwA4Msyyd2OHVu-pB2OrGv6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Y25LxxRc4eJJ8xpIC44rT5Ew4Otzf0zrlzzM92Cv1HvhCcOiNK8nRCwkbTnJEIh-EuU70IdttYSfilqSruk2x0r8Msk1qrDtbyBF60CToRKC2ycDKgolTyuaDnX4yU7lyTvdyD-L0YQwYpmmFy_k0","qi":"vy7XCwZ3jyMGik81TIZDAOQKC8FVUc0TG5KVYfti4tgwzUqFwtuB8Oc1ctCKRbE7uZUPwZh4OsCTLqIvqBQda_kaxOxo5EF7iXj6yHmZ2s8P_Z_u3JLuh-oAT_6kmbLx6CAO0DbtKtxp24Ivc1hDfqSwWORgN1AOrSRCmE3nwxg"} > >>>> _______________________________________________ jose mailing > >>>> list [email protected] <mailto:[email protected]> > >>>> https://www.ietf.org/mailman/listinfo/jose > >>> > >> > >> > >> > >> > >> -- Ping Identity logo <https://www.pingidentity.com/> Brian > >> Campbell Portfolio Architect @ [email protected] > >> <mailto:[email protected]> phone +1 720.317.2061 > >> <tel:%2B1%20720.317.2061> Connect with us… twitter logo > >> <https://twitter.com/pingidentity> youtube logo > >> <https://www.youtube.com/user/PingIdentityTV> LinkedIn logo > >> <https://www.linkedin.com/company/21870> Facebook logo > >> <https://www.facebook.com/pingidentitypage> Google+ logo > >> <https://plus.google.com/u/0/114266977739397708540> slideshare > >> logo <http://www.slideshare.net/PingIdentity> flipboard logo > >> <http://flip.it/vjBF7> rss feed icon > >> <https://www.pingidentity.com/blogs/> > >> > >> Register for Cloud Identity Summit 2014 | Modern Identity > >> Revolution | 19–23 July, 2014 | Monterey, CA > >> <https://www.cloudidentitysummit.com/> > >> > >> > > > > > > _______________________________________________ jose mailing list > > [email protected] <mailto:[email protected]> > > https://www.ietf.org/mailman/listinfo/jose > > > > > > > > > > -- Ping Identity logo <https://www.pingidentity.com/> Brian > > Campbell Portfolio Architect @ [email protected] > > <mailto:[email protected]> phone +1 720.317.2061 Connect > > with us… twitter logo <https://twitter.com/pingidentity> youtube > > logo <https://www.youtube.com/user/PingIdentityTV> LinkedIn logo > > <https://www.linkedin.com/company/21870> Facebook logo > > <https://www.facebook.com/pingidentitypage> Google+ logo > > <https://plus.google.com/u/0/114266977739397708540> slideshare > > logo <http://www.slideshare.net/PingIdentity> flipboard logo > > <http://flip.it/vjBF7> rss feed icon > > <https://www.pingidentity.com/blogs/> > > > > Register for Cloud Identity Summit 2014 | Modern Identity > > Revolution | 19–23 July, 2014 | Monterey, CA > > <https://www.cloudidentitysummit.com/> > > > > > > > > > > _______________________________________________ jose mailing list > > [email protected] https://www.ietf.org/mailman/listinfo/jose > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG/MacGPG2 v2.0.22 (Darwin) > Comment: GPGTools - https://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQEcBAEBCgAGBQJTaarnAAoJEDWi+S0W7cO1PHYH/3sUifwQv4vSi3PO6V5AwMad > CuBlGYa4POF74O3QGqKF+aTHrB97MzSoj2Uz8hJCROGBpTxCSqx9CK3BOJ8hnGmI > 6fq0FHDeA7WeCMkaxrNclX3WabaYHjB6hPlFKK+zB6z7jsr6F/sikmCJIbgNHeRn > LI2Io02I3b2TUGDp90e4r5nZb/TlO7jV2kuwj8gprll1eBGiKfYdtlhpDiby7DPX > QQuNNzGNlLmk90eAd4HfQvL6CrIbQgOgmgs5D0ZRXYzxn5hmABuOPBONhGlTD7xG > xdkzNrD4frOAdLprtaC8cfarW6UYSTUOhNkyffDfFa3SIEzaF1JvnEVoMk8IW+A= > =O9Ex > -----END PGP SIGNATURE----- >
_______________________________________________ jose mailing list [email protected] https://www.ietf.org/mailman/listinfo/jose
