public SchemeFfcDhHybrid1( IDsaFfc dsa, IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, SchemeParametersBase <KasDsaAlgoAttributesFfc> schemeParameters, KdfParameters kdfParameters, MacParameters macParameters, IDiffieHellman <FfcDomainParameters, FfcKeyPair> diffieHellman ) : base( dsa, kdfFactory, keyConfirmationFactory, noKeyConfirmationFactory, otherInfoFactory, entropyProvider, schemeParameters, kdfParameters, macParameters ) { _diffieHellman = diffieHellman; if (SchemeParameters.KasAlgoAttributes.Scheme != FfcScheme.DhHybrid1) { throw new ArgumentException(nameof(SchemeParameters.KasAlgoAttributes.Scheme)); } }
public SchemeFfcMqv2( IDsaFfc dsa, IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, SchemeParametersBase <KasDsaAlgoAttributesFfc> schemeParameters, KdfParameters kdfParameters, MacParameters macParameters, IMqv <FfcDomainParameters, FfcKeyPair> mqv ) : base( dsa, kdfFactory, keyConfirmationFactory, noKeyConfirmationFactory, otherInfoFactory, entropyProvider, schemeParameters, kdfParameters, macParameters ) { _mqv = mqv; if (SchemeParameters.KasAlgoAttributes.Scheme != FfcScheme.Mqv2) { throw new ArgumentException(nameof(SchemeParameters.KasAlgoAttributes.Scheme)); } }
public SchemeEccFullMqv( IDsaEcc dsa, IEccCurveFactory curveFactory, IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, SchemeParametersBase <KasDsaAlgoAttributesEcc> schemeParameters, KdfParameters kdfParameters, MacParameters macParameters, IMqv <EccDomainParameters, EccKeyPair> mqv ) : base( dsa, curveFactory, kdfFactory, keyConfirmationFactory, noKeyConfirmationFactory, otherInfoFactory, entropyProvider, schemeParameters, kdfParameters, macParameters ) { _mqv = mqv; if (SchemeParameters.KasAlgoAttributes.Scheme != EccScheme.FullMqv) { throw new ArgumentException(nameof(SchemeParameters.KasAlgoAttributes.Scheme)); } }
public SchemeEccOnePassUnified( IDsaEcc dsa, IEccCurveFactory curveFactory, IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, SchemeParametersBase <KasDsaAlgoAttributesEcc> schemeParameters, KdfParameters kdfParameters, MacParameters macParameters, IDiffieHellman <EccDomainParameters, EccKeyPair> diffieHellman ) : base( dsa, curveFactory, kdfFactory, keyConfirmationFactory, noKeyConfirmationFactory, otherInfoFactory, entropyProvider, schemeParameters, kdfParameters, macParameters ) { _diffieHellman = diffieHellman; if (SchemeParameters.KasAlgoAttributes.Scheme != EccScheme.OnePassUnified) { throw new ArgumentException(nameof(SchemeParameters.KasAlgoAttributes.Scheme)); } }
public SchemeEccStaticUnified( IDsaEcc dsa, IEccCurveFactory eccCurveFactory, IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, SchemeParametersBase <KasDsaAlgoAttributesEcc> schemeParameters, KdfParameters kdfParameters, MacParameters macParameters, IDiffieHellman <EccDomainParameters, EccKeyPair> diffieHellman ) : base( dsa, eccCurveFactory, kdfFactory, keyConfirmationFactory, noKeyConfirmationFactory, otherInfoFactory, entropyProvider, schemeParameters, kdfParameters, macParameters ) { _diffieHellman = diffieHellman; }
public SchemeFfcDiffieHellmanEphemeral( IDsaFfc dsa, IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, SchemeParametersBase<KasDsaAlgoAttributesFfc> schemeParameters, KdfParameters kdfParameters, MacParameters macParameters, IDiffieHellman<FfcDomainParameters, FfcKeyPair> dh ) : base(dsa, kdfFactory, keyConfirmationFactory, noKeyConfirmationFactory, otherInfoFactory, entropyProvider, schemeParameters, kdfParameters, macParameters) { _diffieHellman = dh; if (SchemeParameters.KasAlgoAttributes.Scheme != FfcScheme.DhEphem) { throw new ArgumentException(nameof(SchemeParameters.KasAlgoAttributes.Scheme)); } if (SchemeParameters.KasMode == KasMode.KdfKc) { throw new ArgumentException($"{SchemeParameters.KasMode} not possible with {SchemeParameters.KasAlgoAttributes.Scheme}"); } }
protected SchemeBaseEcc( IDsaEcc dsa, IEccCurveFactory eccCurveFactory, IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, SchemeParametersBase <KasDsaAlgoAttributesEcc> schemeParameters, KdfParameters kdfParameters, MacParameters macParameters ) : base( kdfFactory, keyConfirmationFactory, noKeyConfirmationFactory, otherInfoFactory, entropyProvider, schemeParameters, kdfParameters, macParameters ) { Dsa = dsa; EccCurveFactory = eccCurveFactory; }
protected void SetWithInjectablesToConstructionState() { _withKdfFactory = _originalKdfFactory; _withKeyConfirmationFactory = _originalKeyConfirmationFactory; _withNoKeyConfirmationFactory = _originalNoKeyConfirmationFactory; _withOtherInfoFactory = _originalOtherInfoFactory; _withEntropyProvider = _originalEntropyProvider; _withDiffieHellman = _originalDiffieHellmanFfc; _withMqv = _originalMqv; }
public SchemeEccOnePassDh( IDsaEcc dsa, IEccCurveFactory curveFactory, IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, SchemeParametersBase <KasDsaAlgoAttributesEcc> schemeParameters, KdfParameters kdfParameters, MacParameters macParameters, IDiffieHellman <EccDomainParameters, EccKeyPair> diffieHellman ) : base( dsa, curveFactory, kdfFactory, keyConfirmationFactory, noKeyConfirmationFactory, otherInfoFactory, entropyProvider, schemeParameters, kdfParameters, macParameters ) { _diffieHellman = diffieHellman; if (SchemeParameters.KasAlgoAttributes.Scheme != EccScheme.OnePassDh) { throw new ArgumentException(nameof(SchemeParameters.KasAlgoAttributes.Scheme)); } if (SchemeParameters.KeyConfirmationDirection == KeyConfirmationDirection.Bilateral || (SchemeParameters.KeyAgreementRole == KeyAgreementRole.InitiatorPartyU && SchemeParameters.KeyConfirmationRole == KeyConfirmationRole.Provider) || (SchemeParameters.KeyAgreementRole == KeyAgreementRole.ResponderPartyV && SchemeParameters.KeyConfirmationRole == KeyConfirmationRole.Recipient)) { throw new ArgumentException("Only unilateral Key confirmation possible party V to U"); } }
public SchemeBuilderFfc( IDsaFfcFactory dsaFfcFactory, IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, IDiffieHellman <FfcDomainParameters, FfcKeyPair> diffieHellmanFfc, IMqv <FfcDomainParameters, FfcKeyPair> mqv) : base( kdfFactory, keyConfirmationFactory, noKeyConfirmationFactory, otherInfoFactory, entropyProvider, diffieHellmanFfc, mqv) { _dsaFfcFactory = dsaFfcFactory; }
protected SchemeBuilderBase( IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, IDiffieHellman <TDomainParameters, TKeyPair> diffieHellmanFfc, IMqv <TDomainParameters, TKeyPair> mqv ) { _originalKdfFactory = kdfFactory; _originalKeyConfirmationFactory = keyConfirmationFactory; _originalNoKeyConfirmationFactory = noKeyConfirmationFactory; _originalOtherInfoFactory = otherInfoFactory; _originalEntropyProvider = entropyProvider; _originalDiffieHellmanFfc = diffieHellmanFfc; _originalMqv = mqv; SetWithInjectablesToConstructionState(); }
protected SchemeBase( IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, TSchemeParameters schemeParameters, KdfParameters kdfParameters, MacParameters macParameters ) { KdfFactory = kdfFactory; KeyConfirmationFactory = keyConfirmationFactory; NoKeyConfirmationFactory = noKeyConfirmationFactory; OtherInfoFactory = otherInfoFactory; EntropyProvider = entropyProvider; SchemeParameters = schemeParameters; KdfParameters = kdfParameters; MacParameters = macParameters; }
public SchemeBuilderEcc( IDsaEccFactory dsaEccFactory, IEccCurveFactory eccCurveFactory, IKdfOneStepFactory kdfFactory, IKeyConfirmationFactory keyConfirmationFactory, INoKeyConfirmationFactory noKeyConfirmationFactory, IOtherInfoFactory otherInfoFactory, IEntropyProvider entropyProvider, IDiffieHellman <EccDomainParameters, EccKeyPair> diffieHellmanEcc, IMqv <EccDomainParameters, EccKeyPair> mqv) : base( kdfFactory, keyConfirmationFactory, noKeyConfirmationFactory, otherInfoFactory, entropyProvider, diffieHellmanEcc, mqv ) { _dsaEccFactory = dsaEccFactory; _eccCurveFactory = eccCurveFactory; }
public FakeNoKeyConfirmationFactory_BadMacData() { _noKeyConfirmationFactory = new NoKeyConfirmationFactory( new FakeNoKeyConfirmationMacDataCreator(new NoKeyConfirmationMacDataCreator())); }
WithNoKeyConfirmationFactory(INoKeyConfirmationFactory noKeyConfirmationFactory) { _withNoKeyConfirmationFactory = noKeyConfirmationFactory; return(this); }