-
Notifications
You must be signed in to change notification settings - Fork 61
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
Use vc-derive-credential to create a derived credential with selectiv… #503
Conversation
9339262
to
ef20bb1
Compare
ef20bb1
to
2c84161
Compare
…ely disclosed claims and a BBS+ signature vc-derive-credential, when combined with --nonce, now verifies a BBS+ derived credential Check hashes that are revealed from BBS+ derived credential verification with the claims in the derived credential. Turn off canonicalization for now if using BBS+. Update to_nquads_vec to into_nquads_vec, following new conventions
5618074
to
baf3f19
Compare
c639fcb
to
13b4db9
Compare
13b4db9
to
aaa0d85
Compare
algorithm: Algorithm, | ||
key: &JWK, | ||
payload: &JWSPayload, | ||
) -> Result<Vec<u8>, Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May want to refactor this logic into sign_bytes instead.
@@ -337,6 +339,21 @@ impl JWK { | |||
crate::aleo::generate_private_key_jwk().map_err(Error::AleoGeneratePrivateKey) | |||
} | |||
|
|||
//#[cfg(feature = "bbs")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably get this working
ssi-ldp/src/lib.rs
Outdated
let Base64urlUInt(pk_bytes) = &okp.public_key; | ||
PublicKey::try_from(pk_bytes.as_slice()).unwrap() | ||
} | ||
_ => unimplemented!(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return an error instead
ssi-ldp/src/lib.rs
Outdated
let proof_str = header_str.clone() + ".." + bbs_proof_str.as_str(); | ||
|
||
let mut proof_with_new_sig = proof.clone(); | ||
proof_with_new_sig.jws = Some(proof_str); // todo: change to proof/proofValue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to change to proof or proofValue?
} | ||
} | ||
|
||
let hash = sha256(path.as_bytes()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is worth investigating whether using SHA-256 is a good idea. Perhaps this choice of hash function can be attacked.
document: &(dyn LinkedDataDocument + Sync), | ||
proof: &Proof, | ||
context_loader: &mut ContextLoader, | ||
) -> Result<JWSPayload, Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to consolidate this with the original to_jws_payload
… during verification, assume all messages revealed, no 0 messages revealed.
71fc668
to
99b8e44
Compare
61a9d71
to
bf53d3e
Compare
1abff18
to
46f2795
Compare
d2a67b9
to
b9278e1
Compare
b9278e1
to
4c65a4c
Compare
4c65a4c
to
f7cb029
Compare
|
ssi got support for |
…ely disclosed claims and a BBS+ signature
vc-derive-credential, when combined with --nonce, now verifies a BBS+ derived credential
Check hashes that are revealed from BBS+ derived credential verification with the claims in the derived credential. Turn off canonicalization for now if using BBS+.
Update to_nquads_vec to into_nquads_vec, following new conventions