예제 #1
0
        public MonteCarloTdesCfbp(IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory modeFactory, IMonteCarloKeyMakerTdes keyMaker, BlockCipherModesOfOperation mode)
        {
            _algo = modeFactory.GetStandardCipher(
                engineFactory.GetSymmetricCipherPrimitive(BlockCipherEngines.Tdes),
                mode
                );
            _keyMaker = keyMaker;
            switch (mode)
            {
            case BlockCipherModesOfOperation.CfbpBit:
                Shift = 1;
                break;

            case BlockCipherModesOfOperation.CfbpByte:
                Shift = 8;
                break;

            case BlockCipherModesOfOperation.CfbpBlock:
                Shift = 64;
                break;

            default:
                throw new ArgumentException(nameof(mode));
            }
        }
예제 #2
0
 public MonteCarloTdesCbci(IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory modeFactory, IMonteCarloKeyMakerTdes keyMaker)
 {
     _algo = modeFactory.GetStandardCipher(
         engineFactory.GetSymmetricCipherPrimitive(BlockCipherEngines.Tdes),
         BlockCipherModesOfOperation.Ecb
         );
     _keyMaker = keyMaker;
 }
예제 #3
0
 public MonteCarloAesCbcCts(IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory modeFactory, IMonteCarloKeyMakerAes keyMaker, BlockCipherModesOfOperation mode)
 {
     _algo = modeFactory.GetStandardCipher(
         engineFactory.GetSymmetricCipherPrimitive(BlockCipherEngines.Aes),
         mode
         );
     _keyMaker = keyMaker;
 }
예제 #4
0
 public MonteCarloTdesCfb(
     IBlockCipherEngineFactory engineFactory,
     IModeBlockCipherFactory modeFactory,
     IMonteCarloKeyMakerTdes keyMaker,
     int shiftSize,
     BlockCipherModesOfOperation mode
     )
 {
     _algo = modeFactory.GetStandardCipher(
         engineFactory.GetSymmetricCipherPrimitive(BlockCipherEngines.Tdes),
         mode
         );
     _keyMaker = keyMaker;
     Shift     = shiftSize;
 }
예제 #5
0
        public MonteCarloAesCfb(
            IBlockCipherEngineFactory engineFactory,
            IModeBlockCipherFactory modeFactory,
            IMonteCarloKeyMakerAes keyMaker,
            int shiftSize,
            BlockCipherModesOfOperation mode
            )
        {
            var engine = engineFactory.GetSymmetricCipherPrimitive(BlockCipherEngines.Aes);

            _algo = modeFactory.GetStandardCipher(
                engine,
                mode
                );
            _keyMaker      = keyMaker;
            _blockSizeBits = engine.BlockSizeBits;
            Shift          = shiftSize;
        }
예제 #6
0
 public CmacFactory(IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory modeFactory)
 {
     _engineFactory = engineFactory;
     _modeFactory   = modeFactory;
 }
예제 #7
0
 public KeyWrapAes(IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory cipherFactory) : base(engineFactory, cipherFactory)
 {
 }
예제 #8
0
 public FakeDrbgCounterAes(IEntropyProvider entropyProvider, IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory cipherFactory, DrbgParameters drbgParameters)
     : base(entropyProvider, engineFactory, cipherFactory, drbgParameters)
 {
 }
예제 #9
0
 public CmacTdes(IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory modeFactory)
 {
     Engine   = engineFactory.GetSymmetricCipherPrimitive(BlockCipherEngines.Tdes);
     AlgoMode = modeFactory.GetStandardCipher(Engine, BlockCipherModesOfOperation.Ecb);
 }
예제 #10
0
 public AesMonteCarloFactory(IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory modeFactory)
 {
     _engineFactory = engineFactory;
     _modeFactory   = modeFactory;
 }
예제 #11
0
 public DrbgCounterAes(IEntropyProvider entropyProvider, IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory cipherFactory, DrbgParameters drbgParameters)
     : base(entropyProvider, drbgParameters)
 {
     Cipher = cipherFactory.GetStandardCipher(
         engineFactory.GetSymmetricCipherPrimitive(BlockCipherEngines.Aes), BlockCipherModesOfOperation.Ecb);
 }
예제 #12
0
 public AesFfInternals(IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory modeFactory)
 {
     _engineFactory = engineFactory;
     _modeFactory   = modeFactory;
 }
 public FfxModeBlockCipherFactory(IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory modeFactory, IAesFfInternals aesFfInternals)
 {
     _engineFactory  = engineFactory;
     _modeFactory    = modeFactory;
     _aesFfInternals = aesFfInternals;
 }
예제 #14
0
 protected KeyWrapBaseAes(IBlockCipherEngineFactory engineFactory, IModeBlockCipherFactory cipherFactory)
 {
     Cipher = cipherFactory.GetStandardCipher(engineFactory.GetSymmetricCipherPrimitive(BlockCipherEngines.Aes), BlockCipherModesOfOperation.Ecb);
 }
예제 #15
0
 public AES_GCMInternals(IModeBlockCipherFactory modeFactory, IBlockCipherEngineFactory engineFactory)
 {
     _modeFactory   = modeFactory;
     _engineFactory = engineFactory;
 }