public void Setup() { var shaFactory = new NativeShaFactory(); var hmacFactory = new HmacFactory(shaFactory); var entropyFactory = new EntropyProviderFactory(); var rsa = new Rsa(new RsaVisitor()); var kdfVisitor = new KdfVisitor( new KdfOneStepFactory(shaFactory, new HmacFactory(shaFactory), new KmacFactory(new CSHAKEWrapper())), new Crypto.KDF.KdfFactory(new CmacFactory(new BlockCipherEngineFactory(), new ModeBlockCipherFactory()), hmacFactory), hmacFactory, new CmacFactory(new BlockCipherEngineFactory(), new ModeBlockCipherFactory()), new IkeV1Factory(hmacFactory, shaFactory), new IkeV2Factory(hmacFactory), new TlsKdfFactory(hmacFactory), new HkdfFactory(hmacFactory)); _rsaSve = new RsaSve(rsa, _entropyProvider); _kasBuilderPartyU = new KasIfcBuilder(); _schemeBuilderPartyU = new SchemeIfcBuilder(kdfVisitor); _kasBuilderPartyV = new KasIfcBuilder(); _schemeBuilderPartyV = new SchemeIfcBuilder(kdfVisitor); _secretKeyingMaterialBuilderPartyU = new IfcSecretKeyingMaterialBuilder(); _secretKeyingMaterialBuilderPartyV = new IfcSecretKeyingMaterialBuilder(); _kdfFactory = new KdfFactory(kdfVisitor); _kdfParameterVisitor = new KdfParameterVisitor(entropyFactory.GetEntropyProvider(EntropyProviderTypes.Random)); _ktsFactory = new KtsFactory(shaFactory, rsa, entropyFactory); _keyConfirmationFactory = new KeyConfirmationFactory(new KeyConfirmationMacDataCreator()); _fixedInfoFactory = new FixedInfoFactory(new FixedInfoStrategyFactory()); }
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; }
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) { }
public ISchemeIfcBuilder WithRsaSve(IRsaSve value) { _rsaSve = value; return(this); }