Adding support for "internal mode" and fake credential response + test vectors (#155)
* Adding support for internal and external mode
This commit is contained in:
@@ -21,7 +21,6 @@ pub trait KeyExchange<D: Hash, G: Group> {
|
||||
type KE3Message: FromBytes + ToBytes + Clone;
|
||||
|
||||
fn generate_ke1<R: RngCore + CryptoRng>(
|
||||
info: Vec<u8>,
|
||||
rng: &mut R,
|
||||
) -> Result<(Self::KE1State, Self::KE1Message), ProtocolError>;
|
||||
|
||||
@@ -35,8 +34,8 @@ pub trait KeyExchange<D: Hash, G: Group> {
|
||||
server_s_sk: PrivateKey,
|
||||
id_u: Vec<u8>,
|
||||
id_s: Vec<u8>,
|
||||
e_info: Vec<u8>,
|
||||
) -> Result<(Vec<u8>, Self::KE2State, Self::KE2Message), ProtocolError>;
|
||||
context: Vec<u8>,
|
||||
) -> Result<(Self::KE2State, Self::KE2Message), ProtocolError>;
|
||||
|
||||
#[allow(clippy::too_many_arguments, clippy::type_complexity)]
|
||||
fn generate_ke3(
|
||||
@@ -48,7 +47,8 @@ pub trait KeyExchange<D: Hash, G: Group> {
|
||||
client_s_sk: PrivateKey,
|
||||
id_u: Vec<u8>,
|
||||
id_s: Vec<u8>,
|
||||
) -> Result<(Vec<u8>, Vec<u8>, Self::KE3Message), ProtocolError>;
|
||||
context: Vec<u8>,
|
||||
) -> Result<(Vec<u8>, Self::KE3Message), ProtocolError>;
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
fn finish_ke(
|
||||
|
||||
Reference in New Issue
Block a user