Enum ssi_crypto::algorithm::AlgorithmInstance
source · pub enum AlgorithmInstance {
Show 21 variants
HS256,
HS384,
HS512,
RS256,
RS384,
RS512,
PS256,
PS384,
PS512,
EdDSA,
EdBlake2b,
ES256,
ES384,
ES256K,
ES256KR,
ESKeccakK,
ESKeccakKR,
ESBlake2b,
ESBlake2bK,
Bbs(BbsInstance),
None,
// some variants omitted
}
Variants§
HS256
HMAC using SHA-256.
HS384
HMAC using SHA-384.
HS512
HMAC using SHA-512.
RS256
RSASSA-PKCS1-v1_5 using SHA-256.
RS384
RSASSA-PKCS1-v1_5 using SHA-384.
RS512
RSASSA-PKCS1-v1_5 using SHA-512.
PS256
RSASSA-PSS using SHA-256 and MGF1 with SHA-256.
PS384
RSASSA-PSS using SHA-384 and MGF1 with SHA-384.
PS512
RSASSA-PSS using SHA-512 and MGF1 with SHA-512.
EdDSA
Edwards-curve Digital Signature Algorithm (EdDSA) using SHA-256.
The following curves are defined for use with EdDSA
:
Ed25519
Ed448
EdBlake2b
EdDSA using SHA-256 and Blake2b as pre-hash function.
ES256
ECDSA using P-256 and SHA-256.
ES384
ECDSA using P-384 and SHA-384.
ES256K
ECDSA using secp256k1 (K-256) and SHA-256.
ES256KR
ECDSA using secp256k1 (K-256) and SHA-256 with a recovery bit.
ES256K-R
is similar to ES256K
with the recovery bit appended, making
the signature 65 bytes instead of 64. The recovery bit is used to
extract the public key from the signature.
See: https://github.com/decentralized-identity/EcdsaSecp256k1RecoverySignature2020#es256k-r
ESKeccakK
ECDSA using secp256k1 (K-256) and Keccak-256.
Like ES256K
but using Keccak-256 instead of SHA-256.
ESKeccakKR
ECDSA using secp256k1 (K-256) and Keccak-256 with a recovery bit.
Like ES256K-R
but using Keccak-256 instead of SHA-256.
ESBlake2b
ECDSA using P-256 and Blake2b.
ESBlake2bK
ECDSA using secp256k1 (K-256) and Blake2b.
Bbs(BbsInstance)
BBS scheme.
None
No signature
Implementations§
Trait Implementations§
source§impl Clone for AlgorithmInstance
impl Clone for AlgorithmInstance
source§fn clone(&self) -> AlgorithmInstance
fn clone(&self) -> AlgorithmInstance
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AlgorithmInstance
impl Debug for AlgorithmInstance
source§impl From<AleoTestnet1Signature> for AlgorithmInstance
impl From<AleoTestnet1Signature> for AlgorithmInstance
source§fn from(_: AleoTestnet1Signature) -> Self
fn from(_: AleoTestnet1Signature) -> Self
source§impl From<AnyBlake2b> for AlgorithmInstance
impl From<AnyBlake2b> for AlgorithmInstance
source§fn from(value: AnyBlake2b) -> Self
fn from(value: AnyBlake2b) -> Self
source§impl From<AnyESKeccakK> for AlgorithmInstance
impl From<AnyESKeccakK> for AlgorithmInstance
source§fn from(value: AnyESKeccakK) -> Self
fn from(value: AnyESKeccakK) -> Self
source§impl From<BbsInstance> for AlgorithmInstance
impl From<BbsInstance> for AlgorithmInstance
source§fn from(value: BbsInstance) -> Self
fn from(value: BbsInstance) -> Self
source§impl From<ES256> for AlgorithmInstance
impl From<ES256> for AlgorithmInstance
source§impl From<ES256K> for AlgorithmInstance
impl From<ES256K> for AlgorithmInstance
source§impl From<ES256KR> for AlgorithmInstance
impl From<ES256KR> for AlgorithmInstance
source§impl From<ES256OrES384> for AlgorithmInstance
impl From<ES256OrES384> for AlgorithmInstance
source§fn from(value: ES256OrES384) -> Self
fn from(value: ES256OrES384) -> Self
source§impl From<ES384> for AlgorithmInstance
impl From<ES384> for AlgorithmInstance
source§impl From<ESBlake2b> for AlgorithmInstance
impl From<ESBlake2b> for AlgorithmInstance
source§impl From<ESBlake2bK> for AlgorithmInstance
impl From<ESBlake2bK> for AlgorithmInstance
source§fn from(_: ESBlake2bK) -> Self
fn from(_: ESBlake2bK) -> Self
source§impl From<ESKeccakK> for AlgorithmInstance
impl From<ESKeccakK> for AlgorithmInstance
source§impl From<ESKeccakKR> for AlgorithmInstance
impl From<ESKeccakKR> for AlgorithmInstance
source§fn from(_: ESKeccakKR) -> Self
fn from(_: ESKeccakKR) -> Self
source§impl From<EdBlake2b> for AlgorithmInstance
impl From<EdBlake2b> for AlgorithmInstance
source§impl From<EdDSA> for AlgorithmInstance
impl From<EdDSA> for AlgorithmInstance
source§impl From<HS256> for AlgorithmInstance
impl From<HS256> for AlgorithmInstance
source§impl From<HS384> for AlgorithmInstance
impl From<HS384> for AlgorithmInstance
source§impl From<HS512> for AlgorithmInstance
impl From<HS512> for AlgorithmInstance
source§impl From<PS256> for AlgorithmInstance
impl From<PS256> for AlgorithmInstance
source§impl From<PS384> for AlgorithmInstance
impl From<PS384> for AlgorithmInstance
source§impl From<PS512> for AlgorithmInstance
impl From<PS512> for AlgorithmInstance
source§impl From<RS256> for AlgorithmInstance
impl From<RS256> for AlgorithmInstance
source§impl From<RS384> for AlgorithmInstance
impl From<RS384> for AlgorithmInstance
source§impl From<RS512> for AlgorithmInstance
impl From<RS512> for AlgorithmInstance
source§impl TryFrom<AlgorithmInstance> for AleoTestnet1Signature
impl TryFrom<AlgorithmInstance> for AleoTestnet1Signature
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for AnyBlake2b
impl TryFrom<AlgorithmInstance> for AnyBlake2b
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for BbsInstance
impl TryFrom<AlgorithmInstance> for BbsInstance
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for ES256
impl TryFrom<AlgorithmInstance> for ES256
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for ES256K
impl TryFrom<AlgorithmInstance> for ES256K
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for ES256KR
impl TryFrom<AlgorithmInstance> for ES256KR
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for ES384
impl TryFrom<AlgorithmInstance> for ES384
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for ESBlake2b
impl TryFrom<AlgorithmInstance> for ESBlake2b
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for ESBlake2bK
impl TryFrom<AlgorithmInstance> for ESBlake2bK
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for ESKeccakK
impl TryFrom<AlgorithmInstance> for ESKeccakK
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for ESKeccakKR
impl TryFrom<AlgorithmInstance> for ESKeccakKR
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for EdBlake2b
impl TryFrom<AlgorithmInstance> for EdBlake2b
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for EdDSA
impl TryFrom<AlgorithmInstance> for EdDSA
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for HS256
impl TryFrom<AlgorithmInstance> for HS256
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for HS384
impl TryFrom<AlgorithmInstance> for HS384
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for HS512
impl TryFrom<AlgorithmInstance> for HS512
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for PS256
impl TryFrom<AlgorithmInstance> for PS256
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for PS384
impl TryFrom<AlgorithmInstance> for PS384
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for PS512
impl TryFrom<AlgorithmInstance> for PS512
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for RS256
impl TryFrom<AlgorithmInstance> for RS256
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for RS384
impl TryFrom<AlgorithmInstance> for RS384
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
source§impl TryFrom<AlgorithmInstance> for RS512
impl TryFrom<AlgorithmInstance> for RS512
§type Error = UnsupportedAlgorithm
type Error = UnsupportedAlgorithm
Auto Trait Implementations§
impl Freeze for AlgorithmInstance
impl RefUnwindSafe for AlgorithmInstance
impl Send for AlgorithmInstance
impl Sync for AlgorithmInstance
impl Unpin for AlgorithmInstance
impl UnwindSafe for AlgorithmInstance
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more