Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecdsa-01.json has invalid base64 for y value #84

Open
mcr opened this issue May 24, 2017 · 1 comment
Open

ecdsa-01.json has invalid base64 for y value #84

mcr opened this issue May 24, 2017 · 1 comment

Comments

@mcr
Copy link

mcr commented May 24, 2017

The y-value listed in the file:

 "y":"IBOL-C3BttVivg-lSreASjpkttcsz-1rb7btKLv8EX4",

is not valid base64! "-" is not a base64 character according to https://en.wikipedia.org/wiki/Base64 and RFC4648. My ruby decoding does not automatically process it. Your encoding is base64url encoded.

Base64.urlsafe_decode64(str) solves this problem, but I wonder if the examples should be coded
into stock base64?

@jimsch
Copy link
Contributor

jimsch commented May 25, 2017

That is an interesting question. They are encoded to base64url because that is the requirement for JOSE. I am actually thinking about finishing the re-encoding of all them to hex because it is just easier to compare against what is in my debugger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants