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

CatalystSignedDocument signing logic #162

Open
Mr-Leshiy opened this issue Jan 20, 2025 · 0 comments · May be fixed by #185
Open

CatalystSignedDocument signing logic #162

Mr-Leshiy opened this issue Jan 20, 2025 · 0 comments · May be fixed by #185
Assignees
Labels
enhancement New feature or request F14

Comments

@Mr-Leshiy
Copy link
Contributor

Summary

Implement a signing logic for the CatalystSignedDocument object.

Description

  • Inside Content::new method add content: Vec<u8> validation based on the ContentType.
    something like this
match content_type {
ContentType::Json =>  serde_json::from_slice::<serde_json::Value>(&content)?,
ContentType::Cbor => minicbor::decode::<minicbor::data::Token>(&content)?,
}
  • Add a new method verify for CatalystSignedDocument struct. which will verify the underlying signatures and all underlying Uuid types (do the conform to the v7 or v4 versions).
pub fn verify(&self, pk_getter: &impl Fn(&Kid) -> VerifyingKey) -> Result<(), ProblemReport>
  • Add a new method sign for CatalystSignedDocument struct. Which will add a new signature.
pub fn sign(&self, sk: SecretKey, kid: Kid);
  • some unit tests
@saibatizoku saibatizoku moved this from New to 🏗 In progress in Catalyst Jan 21, 2025
@saibatizoku saibatizoku self-assigned this Jan 21, 2025
@saibatizoku saibatizoku added F14 enhancement New feature or request labels Jan 21, 2025
@Mr-Leshiy Mr-Leshiy changed the title 🛠️ [TASK] : CatalystSignedDocument signing logic CatalystSignedDocument signing logic Jan 26, 2025
@saibatizoku saibatizoku moved this from 🏗 In progress to 👀 In review in Catalyst Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request F14
Projects
Status: 👀 In review
2 participants