Ejemplo n.º 1
0
        public void Setup()
        {
            _shaFactory = new NativeShaFactory();
            IHmacFactory hmacFactory = new HmacFactory(_shaFactory);
            IKmacFactory kmacFactory = new KmacFactory(new CSHAKEWrapper());
            ICmacFactory cmacFactory = new CmacFactory(new BlockCipherEngineFactory(), new ModeBlockCipherFactory());

            _kdfVisitor = new KdfVisitor(
                new KdfOneStepFactory(_shaFactory, hmacFactory, kmacFactory),
                new KdfFactory(cmacFactory, hmacFactory),
                hmacFactory,
                cmacFactory,
                new IkeV1Factory(hmacFactory, _shaFactory),
                new IkeV2Factory(hmacFactory),
                new TlsKdfFactory(hmacFactory),
                new HkdfFactory(hmacFactory));
        }
Ejemplo n.º 2
0
 protected SchemeBaseKas
 (
     IEntropyProvider entropyProvider,
     SchemeParametersIfc schemeParameters,
     IFixedInfoFactory fixedInfoFactory,
     FixedInfoParameter fixedInfoParameter,
     IIfcSecretKeyingMaterialBuilder thisPartyKeyingMaterialBuilder,
     IKeyConfirmationFactory keyConfirmationFactory,
     MacParameters macParameters,
     IKdfVisitor kdfVisitor,
     IKdfParameter kdfParameter,
     IRsaSve rsaSve
 ) : base(entropyProvider, schemeParameters, fixedInfoFactory, fixedInfoParameter, thisPartyKeyingMaterialBuilder, keyConfirmationFactory, macParameters)
 {
     _kdfVisitor   = kdfVisitor;
     _kdfParameter = kdfParameter;
     _rsaSve       = rsaSve;
 }
Ejemplo n.º 3
0
 public SchemeBaseKasOneKeyPair(
     IEntropyProvider entropyProvider,
     SchemeParametersIfc schemeParameters,
     IFixedInfoFactory fixedInfoFactory,
     FixedInfoParameter fixedInfoParameter,
     IIfcSecretKeyingMaterialBuilder thisPartyKeyingMaterialBuilder,
     IKeyConfirmationFactory keyConfirmationFactory,
     MacParameters macParameters,
     IKdfVisitor kdfVisitor,
     IKdfParameter kdfParameter,
     IRsaSve rsaSve)
     : base(
         entropyProvider,
         schemeParameters,
         fixedInfoFactory,
         fixedInfoParameter,
         thisPartyKeyingMaterialBuilder,
         keyConfirmationFactory,
         macParameters,
         kdfVisitor,
         kdfParameter,
         rsaSve)
 {
 }
Ejemplo n.º 4
0
 public SchemeIfcBuilder(IKdfVisitor kdfVisitor)
 {
     _kdfVisitor = kdfVisitor;
 }
Ejemplo n.º 5
0
 public KdfResult AcceptKdf(IKdfVisitor visitor, BitString fixedInfo)
 {
     return(visitor.Kdf(this, fixedInfo));
 }
Ejemplo n.º 6
0
 public KdfFactory(IKdfVisitor visitor)
 {
     _visitor = visitor;
 }
Ejemplo n.º 7
0
 public Kdf(IKdfVisitor visitor)
 {
     _visitor = visitor;
 }
Ejemplo n.º 8
0
 public FakeKdfVisitor_BadDkm(IKdfVisitor kdfVisitor, IRandom800_90 random)
 {
     _kdfVisitor = kdfVisitor;
     _random     = random;
 }