Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-6134 Transparent data at rest encryption
  3. HDFS-6737

DFSClient should use IV generated based on the configured CipherSuite with codecs used

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • fs-encryption (HADOOP-10150 and HDFS-6134)
    • None
    • hdfs-client
    • None

    Description

      Seems like we are using IV as like Encrypted data encryption key iv. But the underlying Codec's cipher suite may expect different iv length. So, we should generate IV from the Coec's cipher suite configured.

       final CryptoInputStream cryptoIn =
                new CryptoInputStream(dfsis, CryptoCodec.getInstance(conf, 
                    feInfo.getCipherSuite()), feInfo.getEncryptedDataEncryptionKey(),
                    feInfo.getIV());
      

      So, instead of using feinfo.getIV(), we should generate like

      byte[] iv = new byte[codec.getCipherSuite().getAlgorithmBlockSize()]; 
      codec.generateSecureRandom(iv);
      

      Attachments

        1. HDFS-6737.patch
          0.9 kB
          Uma Maheswara Rao G

        Activity

          People

            umamaheswararao Uma Maheswara Rao G
            umamaheswararao Uma Maheswara Rao G
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: