예제 #1
0
        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));
            }
        }
예제 #2
0
        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));
            }
        }
예제 #3
0
 protected void SetWithInjectablesToConstructionState()
 {
     _withKdfFactory               = _originalKdfFactory;
     _withKeyConfirmationFactory   = _originalKeyConfirmationFactory;
     _withNoKeyConfirmationFactory = _originalNoKeyConfirmationFactory;
     _withOtherInfoFactory         = _originalOtherInfoFactory;
     _withEntropyProvider          = _originalEntropyProvider;
     _withDiffieHellman            = _originalDiffieHellmanFfc;
     _withMqv = _originalMqv;
 }
예제 #4
0
 public SchemeBuilder(
     IDiffieHellman <EccDomainParameters, EccKeyPair> eccDh,
     IDiffieHellman <FfcDomainParameters, FfcKeyPair> ffcDh,
     IMqv <EccDomainParameters, EccKeyPair> eccMqv,
     IMqv <FfcDomainParameters, FfcKeyPair> ffcMqv)
 {
     _eccDh  = eccDh;
     _ffcDh  = ffcDh;
     _eccMqv = eccMqv;
     _ffcMqv = ffcMqv;
 }
예제 #5
0
 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;
 }
예제 #6
0
        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();
        }
예제 #7
0
 public SchemeEccFullMqv(
     SchemeParameters schemeParameters,
     ISecretKeyingMaterial thisPartyKeyingMaterial,
     IFixedInfoFactory fixedInfoFactory,
     FixedInfoParameter fixedInfoParameter,
     IKdfFactory kdfFactory,
     IKdfParameter kdfParameter,
     IKeyConfirmationFactory keyConfirmationFactory,
     MacParameters keyConfirmationParameter,
     IMqv <EccDomainParameters, EccKeyPair> mqv)
     : base(
         schemeParameters,
         thisPartyKeyingMaterial,
         fixedInfoFactory,
         fixedInfoParameter,
         kdfFactory,
         kdfParameter,
         keyConfirmationFactory,
         keyConfirmationParameter)
 {
     _mqv = mqv;
 }
예제 #8
0
 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;
 }