Top Description Fields Constructors Methods
org.h2.store.fs.encrypt

pack-priv Class XTS

extends Object
Class Inheritance
Imports
org.h2.security.BlockCipher

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

Field Summary

Modifier and TypeField and Description
private final BlockCipher
private static final int
CIPHER_BLOCK_SIZE

The AES encryption block size.

private static final int
GF_128_FEEDBACK

Galois field feedback.

Constructor Summary

AccessConstructor and Description
pack-priv
XTS(BlockCipher cipher)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
decrypt(long
the (sector) id
id
,
int
the number of bytes
len
,
byte[]
the data
data
,
int
the offset within the data
offset
)

Decrypt the data.

pack-priv void
encrypt(long
the (sector) id
id
,
int
the number of bytes
len
,
byte[]
the data
data
,
int
the offset within the data
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)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cipherback to summary
private final BlockCipher cipher
CIPHER_BLOCK_SIZEback to summary
private static final int CIPHER_BLOCK_SIZE

The AES encryption block size.

GF_128_FEEDBACKback to summary
private static final int GF_128_FEEDBACK

Galois field feedback.

Constructor Detail

XTSback to summary
pack-priv XTS(BlockCipher cipher)

Method Detail

decryptback to summary
pack-priv void decrypt(long id, int len, byte[] data, int offset)

Decrypt the data.

Parameters
id:long

the (sector) id

len:int

the number of bytes

data:byte[]

the data

offset:int

the offset within the data

encryptback to summary
pack-priv void encrypt(long id, int len, byte[] data, int offset)

Encrypt the data.

Parameters
id:long

the (sector) id

len:int

the number of bytes

data:byte[]

the data

offset:int

the offset within the data

initTweakback to summary
private byte[] initTweak(long id)
swapback to summary
private static void swap(byte[] data, int source, int target, int len)
updateTweakback to summary
private static void updateTweak(byte[] tweak)
xorTweakback to summary
private static void xorTweak(byte[] data, int pos, byte[] tweak)