Пример #1
0
        /// <summary>
        /// Constructor for RSA Key pair (special case for RSA)
        /// </summary>
        /// <param name="rsaKeyPair"></param>
        public CryptoVector(byte[] rsaKeyPair, CryptNativeTestVectorType cryptNativeTestVectorType)
        {
            Debug.Assert(rsaKeyPair != null);

            m_blob0 = rsaKeyPair;
            m_blob1 = null;
            m_blob2 = null;
            m_blob3 = null;
            m_blob4 = null;
            m_cryptoVectorEncryptionType = CryptoVectorEncryptionType.Randomized;
            m_CryptNativeTestVectorType  = cryptNativeTestVectorType;
            m_string0 = null;
        }
Пример #2
0
        /// <summary>
        /// Constructor for AEAD.
        /// </summary>
        /// <param name="rootKey"></param>
        /// <param name="plainText"></param>
        /// <param name="finalCell"></param>
        /// <param name="cryptoVectorEncryptionType"></param>
        public CryptoVector(byte[] rootKey, byte[] plainText, byte[] finalCell, CryptoVectorEncryptionType cryptoVectorEncryptionType)
        {
            Debug.Assert(rootKey != null);
            Debug.Assert(plainText != null);
            Debug.Assert(finalCell != null);

            m_blob0 = rootKey;
            m_blob1 = plainText;
            m_blob2 = finalCell;
            m_cryptoVectorEncryptionType = cryptoVectorEncryptionType;
            m_CryptNativeTestVectorType  = CryptNativeTestVectorType.Aead;
            m_string0 = null;
            m_blob3   = null;
            m_blob4   = null;
        }
Пример #3
0
        /// <summary>
        /// Constructor for RSA test vector
        /// </summary>
        /// <param name="plaintextCek"></param>
        /// <param name="ciphertextCek"></param>
        public CryptoVector(byte[] plaintextCek, byte[] ciphertextCek, byte[] hashedCek, byte[] signedCek, string pathCek, byte[] finalcellCek)
        {
            Debug.Assert(plaintextCek != null);
            Debug.Assert(ciphertextCek != null);
            Debug.Assert(hashedCek != null);
            Debug.Assert(signedCek != null);

            m_blob0   = plaintextCek;
            m_blob1   = ciphertextCek;
            m_blob2   = hashedCek;
            m_blob3   = signedCek;
            m_blob4   = finalcellCek;
            m_string0 = pathCek;
            m_cryptoVectorEncryptionType = CryptoVectorEncryptionType.Randomized;
            m_CryptNativeTestVectorType  = CryptNativeTestVectorType.Rsa;
        }