-
Notifications
You must be signed in to change notification settings - Fork 40
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
ed25519_generate_key_pair should return decoded strings #23
Comments
@r-marques is this resolved by #28 ? hence we can close this? |
No. |
so we can close this? it's not a cc issue |
The thing is though, I think most people (or maybe just me?) would expect that the key generation results in a string, not a byte array. We've already had one instance internally where this assumption caused a bug.
But this consistency has already been broken by some fulfillments' |
The original spec states that these are JS buffers, hence Python bytes. so that assumption can be mitigated by refering to the right docs and spec.
This is routine is custom to our implementation and not part of the original spec. |
I guess if we assume the JS implementation of the w3 spec is the "original" that we should keep ourselves consistent to, then that's fine (although I did find that the RSA signing takes in a string as a private key on a cursory glance). At the end of the day, it just feels like a very awkward interface, but maybe there are good reasons for doing this. |
good find, maybe report this?
yeah, I know - but I think there are some reasons for that. You could ask |
If we want we can be opinionated about this outside of the 'raw' cc package. |
Might be just a docs typo, this is also incorrectly stated as a "string". |
Ok. The more I look around, the more I see that these crypto libs usually return byte arrays so I'm ok if we keep this package 'raw'. I haven't look around too much in terms of higher level libs that use these crypto libs though, so I'm not sure if they usually give back raw results. |
can we close this with #28? |
I think with the discussion today, we'll keep to the js implementation and leave this as-is here. |
From bigchaindb/bigchaindb-common#4. May affect #22.
As far as I can tell, there's no need to return the byte version and it isn't required by the Cryptoconditions spec. We typically use
.decode()
on them anyway.The text was updated successfully, but these errors were encountered: