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

Use vc-derive-credential to create a derived credential with selectiv… #503

Closed
wants to merge 11 commits into from

Conversation

thefireskater
Copy link

…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

…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
@thefireskater thefireskater force-pushed the feat/bbs-sig-2 branch 2 times, most recently from 5618074 to baf3f19 Compare May 18, 2023 22:29
@thefireskater thefireskater force-pushed the feat/bbs-sig-2 branch 2 times, most recently from c639fcb to 13b4db9 Compare June 4, 2023 04:58
algorithm: Algorithm,
key: &JWK,
payload: &JWSPayload,
) -> Result<Vec<u8>, Error> {
Copy link
Author

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")]
Copy link
Author

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

let Base64urlUInt(pk_bytes) = &okp.public_key;
PublicKey::try_from(pk_bytes.as_slice()).unwrap()
}
_ => unimplemented!(),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return an error instead

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
Copy link
Author

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());
Copy link
Author

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> {
Copy link
Author

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

@thefireskater thefireskater force-pushed the feat/bbs-sig-2 branch 4 times, most recently from 71fc668 to 99b8e44 Compare June 12, 2023 18:36
@thefireskater thefireskater force-pushed the feat/bbs-sig-2 branch 2 times, most recently from 61a9d71 to bf53d3e Compare June 15, 2023 04:24
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sbihel
Copy link
Member

sbihel commented Jul 24, 2024

ssi got support for bbs-2023 in #550

@sbihel sbihel closed this Jul 24, 2024
@sbihel sbihel deleted the feat/bbs-sig-2 branch July 24, 2024 09:33
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

Successfully merging this pull request may close these issues.

BBS+ Signatures
3 participants