pub struct Ed25519VerificationKey2020 {
pub id: IriBuf,
pub controller: UriBuf,
pub public_key: PublicKey,
}Expand description
Deprecated verification method for the Ed25519Signature2020 suite.
See: https://w3c.github.io/vc-di-eddsa/#ed25519verificationkey2020
Fields§
§id: IriBufKey identifier.
controller: UriBufController of the verification method.
public_key: PublicKeyPublic key encoded according to MULTICODEC and formatted according to MULTIBASE.
The multicodec encoding of an Ed25519 public key is the two-byte prefix 0xed01 followed by the 32-byte public key data. The 34 byte value is then encoded using base58-btc (z) as the prefix. Any other encoding MUST NOT be allowed.
Implementations§
Source§impl Ed25519VerificationKey2020
impl Ed25519VerificationKey2020
pub const NAME: &'static str = ED25519_VERIFICATION_KEY_2020_TYPE
pub const IRI: &'static Iri
pub fn public_key_jwk(&self) -> JWK
pub fn generate_key_pair( id: IriBuf, controller: UriBuf, csprng: &mut (impl RngCore + CryptoRng), ) -> (Self, SigningKey)
pub fn from_public_key( id: IriBuf, controller: UriBuf, public_key: VerifyingKey, ) -> Self
pub fn sign_bytes<'a>( &self, secret_key: impl Into<SecretKeyRef<'a>>, signing_bytes: &[u8], ) -> Result<Vec<u8>, MessageSignatureError>
pub fn verify_bytes( &self, data: &[u8], signature_bytes: &[u8], ) -> Result<ProofValidity, ProofValidationError>
Trait Implementations§
Source§impl Clone for Ed25519VerificationKey2020
impl Clone for Ed25519VerificationKey2020
Source§fn clone(&self) -> Ed25519VerificationKey2020
fn clone(&self) -> Ed25519VerificationKey2020
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Ed25519VerificationKey2020
impl Debug for Ed25519VerificationKey2020
Source§impl<'de> Deserialize<'de> for Ed25519VerificationKey2020
impl<'de> Deserialize<'de> for Ed25519VerificationKey2020
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<Ed25519VerificationKey2020> for AnyJwkMethod
Deprecated verification method for the Ed25519Signature2020 suite.
impl From<Ed25519VerificationKey2020> for AnyJwkMethod
Deprecated verification method for the Ed25519Signature2020 suite.
Source§fn from(value: Ed25519VerificationKey2020) -> Self
fn from(value: Ed25519VerificationKey2020) -> Self
Source§impl From<Ed25519VerificationKey2020> for AnyMethod
Deprecated verification method for the Ed25519Signature2020 suite.
impl From<Ed25519VerificationKey2020> for AnyMethod
Deprecated verification method for the Ed25519Signature2020 suite.
Source§fn from(value: Ed25519VerificationKey2020) -> Self
fn from(value: Ed25519VerificationKey2020) -> Self
Source§impl Hash for Ed25519VerificationKey2020
impl Hash for Ed25519VerificationKey2020
Source§impl<I_, V_> LinkedData<I_, V_> for Ed25519VerificationKey2020where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
PublicKey: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
impl<I_, V_> LinkedData<I_, V_> for Ed25519VerificationKey2020where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
PublicKey: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
Source§impl<I_, V_> LinkedDataDeserializePredicateObjects<I_, V_> for Ed25519VerificationKey2020where
IriBuf: LinkedDataDeserializeSubject<I_, V_>,
UriBuf: LinkedDataDeserializePredicateObjects<I_, V_>,
PublicKey: LinkedDataDeserializePredicateObjects<I_, V_>,
I_: Interpretation + IriInterpretation<V_::Iri> + ReverseIriInterpretation<Iri = V_::Iri>,
V_: Vocabulary,
impl<I_, V_> LinkedDataDeserializePredicateObjects<I_, V_> for Ed25519VerificationKey2020where
IriBuf: LinkedDataDeserializeSubject<I_, V_>,
UriBuf: LinkedDataDeserializePredicateObjects<I_, V_>,
PublicKey: LinkedDataDeserializePredicateObjects<I_, V_>,
I_: Interpretation + IriInterpretation<V_::Iri> + ReverseIriInterpretation<Iri = V_::Iri>,
V_: Vocabulary,
fn deserialize_objects_in<'de_, D_>( vocabulary: &V_, interpretation: &I_, dataset: &D_, graph: Option<&I_::Resource>, objects: impl IntoIterator<Item = &'de_ I_::Resource>, context: Context<'_, I_>, ) -> Result<Self, FromLinkedDataError>
fn deserialize_objects<'a, D>(
vocabulary: &V,
interpretation: &I,
dataset: &D,
graph: Option<&<I as Interpretation>::Resource>,
objects: impl IntoIterator<Item = &'a <I as Interpretation>::Resource>,
) -> Result<Self, FromLinkedDataError>where
<I as Interpretation>::Resource: 'a,
D: PatternMatchingDataset<Resource = <I as Interpretation>::Resource>,
Source§impl<I_, V_> LinkedDataDeserializeSubject<I_, V_> for Ed25519VerificationKey2020where
IriBuf: LinkedDataDeserializeSubject<I_, V_>,
UriBuf: LinkedDataDeserializePredicateObjects<I_, V_>,
PublicKey: LinkedDataDeserializePredicateObjects<I_, V_>,
I_: Interpretation + IriInterpretation<V_::Iri> + ReverseIriInterpretation<Iri = V_::Iri>,
V_: Vocabulary,
impl<I_, V_> LinkedDataDeserializeSubject<I_, V_> for Ed25519VerificationKey2020where
IriBuf: LinkedDataDeserializeSubject<I_, V_>,
UriBuf: LinkedDataDeserializePredicateObjects<I_, V_>,
PublicKey: LinkedDataDeserializePredicateObjects<I_, V_>,
I_: Interpretation + IriInterpretation<V_::Iri> + ReverseIriInterpretation<Iri = V_::Iri>,
V_: Vocabulary,
fn deserialize_subject_in<D_>(
vocabulary_: &V_,
interpretation_: &I_,
dataset_: &D_,
graph_: Option<&I_::Resource>,
resource_: &I_::Resource,
context_: Context<'_, I_>,
) -> Result<Self, FromLinkedDataError>where
D_: PatternMatchingDataset<Resource = I_::Resource>,
fn deserialize_subject<D>( vocabulary: &V, interpretation: &I, dataset: &D, graph: Option<&<I as Interpretation>::Resource>, resource: &<I as Interpretation>::Resource, ) -> Result<Self, FromLinkedDataError>
Source§impl<I_, V_> LinkedDataGraph<I_, V_> for Ed25519VerificationKey2020where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
PublicKey: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
impl<I_, V_> LinkedDataGraph<I_, V_> for Ed25519VerificationKey2020where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
PublicKey: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
fn visit_graph<S_>(&self, visitor: S_) -> Result<S_::Ok, S_::Error>where
S_: GraphVisitor<I_, V_>,
Source§impl<I_, V_> LinkedDataPredicateObjects<I_, V_> for Ed25519VerificationKey2020where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
PublicKey: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
impl<I_, V_> LinkedDataPredicateObjects<I_, V_> for Ed25519VerificationKey2020where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
PublicKey: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
fn visit_objects<S_>(&self, visitor: S_) -> Result<S_::Ok, S_::Error>where
S_: PredicateObjectsVisitor<I_, V_>,
Source§impl<I_, V_> LinkedDataResource<I_, V_> for Ed25519VerificationKey2020where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
PublicKey: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
impl<I_, V_> LinkedDataResource<I_, V_> for Ed25519VerificationKey2020where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
PublicKey: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
fn interpretation( &self, vocabulary: &mut V_, interpretation: &mut I_, ) -> ResourceInterpretation<'_, I_, V_>
fn lexical_representation<'a>(
&'a self,
vocabulary: &'a mut V,
interpretation: &'a mut I,
) -> Option<CowRdfTerm<'a, V>>where
I: ReverseTermInterpretation<Iri = <V as IriVocabulary>::Iri, BlankId = <V as BlankIdVocabulary>::BlankId, Literal = <V as LiteralVocabulary>::Literal>,
fn reference_interpretation( &self, vocabulary: &mut V, interpretation: &mut I, ) -> ResourceInterpretation<'_, I, V>
Source§impl<I_, V_> LinkedDataSubject<I_, V_> for Ed25519VerificationKey2020where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
PublicKey: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
impl<I_, V_> LinkedDataSubject<I_, V_> for Ed25519VerificationKey2020where
UriBuf: LinkedDataPredicateObjects<I_, V_>,
PublicKey: LinkedDataPredicateObjects<I_, V_>,
IriBuf: LinkedDataResource<I_, V_>,
I_: Interpretation,
V_: Vocabulary + IriVocabularyMut,
fn visit_subject<S_>(&self, visitor: S_) -> Result<S_::Ok, S_::Error>where
S_: SubjectVisitor<I_, V_>,
Source§impl SigningMethod<JWK, EdDSA> for Ed25519VerificationKey2020
impl SigningMethod<JWK, EdDSA> for Ed25519VerificationKey2020
fn sign_bytes( &self, secret_key: &JWK, _algorithm: EdDSA, message: &[u8], ) -> Result<Vec<u8>, MessageSignatureError>
fn sign_bytes_multi( &self, secret: &S, algorithm: <A as SignatureAlgorithmType>::Instance, messages: &[Vec<u8>], ) -> Result<Vec<u8>, MessageSignatureError>
Source§impl SigningMethod<SigningKey, EdDSA> for Ed25519VerificationKey2020
impl SigningMethod<SigningKey, EdDSA> for Ed25519VerificationKey2020
fn sign_bytes( &self, secret: &SigningKey, _algorithm: EdDSA, message: &[u8], ) -> Result<Vec<u8>, MessageSignatureError>
fn sign_bytes_multi( &self, secret: &S, algorithm: <A as SignatureAlgorithmType>::Instance, messages: &[Vec<u8>], ) -> Result<Vec<u8>, MessageSignatureError>
Source§impl TryFrom<AnyJwkMethod> for Ed25519VerificationKey2020
Deprecated verification method for the Ed25519Signature2020 suite.
impl TryFrom<AnyJwkMethod> for Ed25519VerificationKey2020
Deprecated verification method for the Ed25519Signature2020 suite.
Source§type Error = InvalidVerificationMethod
type Error = InvalidVerificationMethod
Source§impl TryFrom<AnyMethod> for Ed25519VerificationKey2020
Deprecated verification method for the Ed25519Signature2020 suite.
impl TryFrom<AnyMethod> for Ed25519VerificationKey2020
Deprecated verification method for the Ed25519Signature2020 suite.
Source§impl TryFrom<GenericVerificationMethod> for Ed25519VerificationKey2020
impl TryFrom<GenericVerificationMethod> for Ed25519VerificationKey2020
Source§type Error = InvalidVerificationMethod
type Error = InvalidVerificationMethod
Source§impl TypedVerificationMethod for Ed25519VerificationKey2020
impl TypedVerificationMethod for Ed25519VerificationKey2020
fn expected_type() -> Option<ExpectedType>
fn type_match(ty: &str) -> bool
fn type_(&self) -> &str
Source§impl VerifyBytes<EdDSA> for Ed25519VerificationKey2020
impl VerifyBytes<EdDSA> for Ed25519VerificationKey2020
fn verify_bytes( &self, _: EdDSA, signing_bytes: &[u8], signature: &[u8], ) -> Result<ProofValidity, ProofValidationError>
impl Eq for Ed25519VerificationKey2020
impl StructuralPartialEq for Ed25519VerificationKey2020
Auto Trait Implementations§
impl Freeze for Ed25519VerificationKey2020
impl RefUnwindSafe for Ed25519VerificationKey2020
impl Send for Ed25519VerificationKey2020
impl Sync for Ed25519VerificationKey2020
impl Unpin for Ed25519VerificationKey2020
impl UnwindSafe for Ed25519VerificationKey2020
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
fn deserialize_typed<S>(
_: &C,
deserializer: S,
) -> Result<T, <S as Deserializer<'de>>::Error>where
S: Deserializer<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<M> MaybeJwkVerificationMethod for Mwhere
M: JwkVerificationMethod,
impl<M> MaybeJwkVerificationMethod for Mwhere
M: JwkVerificationMethod,
Source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
Source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
T.