Class XTS


  • class XTS
    extends java.lang.Object
    An XTS implementation as described in IEEE P1619 (Standard Architecture for Encrypted Shared Storage Media). See also http://axelkenzo.ru/downloads/1619-2007-NIST-Submission.pdf
    • Constructor Summary

      Constructors 
      Constructor Description
      XTS​(BlockCipher cipher)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void decrypt​(long id, int len, byte[] data, int offset)
      Decrypt the data.
      (package private) void encrypt​(long id, int len, byte[] data, int offset)
      Encrypt the data.
      private byte[] initTweak​(long id)  
      private static void swap​(byte[] data, int source, int target, int len)  
      private static void updateTweak​(byte[] tweak)  
      private static void xorTweak​(byte[] data, int pos, byte[] tweak)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GF_128_FEEDBACK

        private static final int GF_128_FEEDBACK
        Galois field feedback.
        See Also:
        Constant Field Values
      • CIPHER_BLOCK_SIZE

        private static final int CIPHER_BLOCK_SIZE
        The AES encryption block size.
        See Also:
        Constant Field Values
    • Method Detail

      • encrypt

        void encrypt​(long id,
                     int len,
                     byte[] data,
                     int offset)
        Encrypt the data.
        Parameters:
        id - the (sector) id
        len - the number of bytes
        data - the data
        offset - the offset within the data
      • decrypt

        void decrypt​(long id,
                     int len,
                     byte[] data,
                     int offset)
        Decrypt the data.
        Parameters:
        id - the (sector) id
        len - the number of bytes
        data - the data
        offset - the offset within the data
      • initTweak

        private byte[] initTweak​(long id)
      • xorTweak

        private static void xorTweak​(byte[] data,
                                     int pos,
                                     byte[] tweak)
      • updateTweak

        private static void updateTweak​(byte[] tweak)
      • swap

        private static void swap​(byte[] data,
                                 int source,
                                 int target,
                                 int len)