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

Rename eddsa-2022 into eddsa-rdfc-2022. #581

Merged
merged 2 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/claims/crates/data-integrity/src/any/suite/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ macros::crypto_suites! {
#[cfg(all(feature = "w3c", feature = "ed25519"))]
ed25519_signature_2020: Ed25519Signature2020,

/// W3C EdDSA Cryptosuite v2022.
/// W3C `eddsa-rdfc-2022` cryptosuite.
///
/// See: <https://w3c.github.io/vc-di-eddsa/>
/// See: <https://w3c.github.io/vc-di-eddsa/#eddsa-rdfc-2022>
#[cfg(all(feature = "w3c", feature = "ed25519"))]
ed_dsa_2022: EdDsa2022,
eddsa_rdfc_2022: EdDsaRdfc2022,

/// W3C Ecdsa Secp256k1 Signature 2019.
///
Expand Down
4 changes: 2 additions & 2 deletions crates/claims/crates/data-integrity/suites/src/suites/w3c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ pub mod ed25519_signature_2020;
pub use ed25519_signature_2020::Ed25519Signature2020;

#[cfg(feature = "ed25519")]
pub mod eddsa_2022;
pub mod eddsa_rdfc_2022;
#[cfg(feature = "ed25519")]
pub use eddsa_2022::EdDsa2022;
pub use eddsa_rdfc_2022::EdDsaRdfc2022;

#[cfg(feature = "secp256k1")]
pub mod ecdsa_secp256k1_signature_2019;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
//! EdDSA Cryptosuite v2022 implementation.
//!
//! This is the successor of the EdDSA Cryptosuite v2020.
//!
//! See: <https://w3c.github.io/vc-di-eddsa/>
use k256::sha2::Sha256;
use ssi_data_integrity_core::{
canonicalization::{CanonicalizeClaimsAndConfiguration, HashCanonicalClaimsAndConfiguration},
Expand All @@ -13,22 +8,19 @@ use ssi_data_integrity_core::{
use ssi_verification_methods::Multikey;
use static_iref::iri;

/// EdDSA Cryptosuite v2020.
/// The `eddsa-rdfc-2022` cryptosuite.
///
/// This is a legacy cryptographic suite for the usage of the EdDSA algorithm
/// and Curve25519. It is recommended to use `edssa-2022` instead.
///
/// See: <https://w3c.github.io/vc-di-eddsa/#the-ed25519signature2020-suite>
/// See: <https://w3c.github.io/vc-di-eddsa/#eddsa-rdfc-2022>
#[derive(Debug, Default, Clone, Copy)]
pub struct EdDsa2022;
pub struct EdDsaRdfc2022;

impl EdDsa2022 {
impl EdDsaRdfc2022 {
pub const NAME: &'static str = "DataIntegrityProof";

pub const IRI: &'static iref::Iri = iri!("https://w3id.org/security#DataIntegrityProof");
}

impl StandardCryptographicSuite for EdDsa2022 {
impl StandardCryptographicSuite for EdDsaRdfc2022 {
type Configuration = NoConfiguration;

type Transformation = CanonicalizeClaimsAndConfiguration;
Expand All @@ -42,6 +34,6 @@ impl StandardCryptographicSuite for EdDsa2022 {
type ProofOptions = ();

fn type_(&self) -> TypeRef {
TypeRef::DataIntegrityProof(CryptosuiteStr::new("eddsa-2022").unwrap())
TypeRef::DataIntegrityProof(CryptosuiteStr::new("eddsa-rdfc-2022").unwrap())
}
}