what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

ice-doc-java.html

ice-doc-java.html
Posted Dec 21, 1999

ice-doc-java.html

tags | java, encryption, steganography
SHA-256 | 5ea3023019af3153db607d32bdd5b425d0d2e77207388d19f41db93f4d1b0378

ice-doc-java.html

Change Mirror Download
<HTML>
<HEAD><TITLE>Class IceKey</TITLE></HEAD>
<BODY BGCOLOR="#d8d8d8" TEXT="#000080" LINK="#0000FF">
<H1> Class IceKey</H1>

<PRE>
class <STRONG>IceKey</STRONG>
{
// Constructors
public <A HREF="#1">IceKey</A>(int level);

// Methods
public void <A HREF="#2">set</A>(byte key[]);
public byte[] <A HREF="#3">encrypt</A>(byte plaintext[], byte ciphertext[]);
public byte[] <A HREF="#4">decrypt</A>(byte ciphertext[], byte plaintext[]);
public void <A HREF="#5">clear</A>();
public int <A HREF="#6">keySize</A>();
public int <A HREF="#7">blockSize</A>();
}
</PRE>

<P>
An <B>IceKey</B> object is used to encrypt and decrypt 8-byte blocks
of data using the ICE encryption algorithm. ICE, an acronym for
<EM>Information Concealment Engine</EM>, is a 64-bit block cipher in
the tradition of DES. However, it aims to be faster and significantly
more secure than DES. </P>
<P>
Unlike DES, ICE has various levels of encryption, where higher levels
provide more security, but at the expense of speed. It also makes use of
a technique called <EM>keyed permutation</EM> internally, which gives
it increased resistance to differential and linear cryptanalysis. </P>
<P>
Once an <B>IceKey</B> object has been created, it will usually have
its key set from a password of some sort. The object can then be used
to encrypt and decrypt data using that key. </P>
<HR>

<H2> Constructors </H2>

<A NAME="1"><H3> IceKey </H3></A>
<CODE> public IceKey(int level) </CODE>
<DL>

<DD> Creates an <B>IceKey</B> object. The <EM>level</EM> parameter specifies
the level of ICE encryption to use, where higher levels require
longer keys and are slower, but are more secure.

<DD> Level 0 uses the <EM>Thin-ICE</EM> variant of ICE, which is an 8-round
cipher taking an 8-byte key. This is the fastest option, and is
generally considered to be at least as secure as DES. For levels
<EM>n</EM> greater than zero, a 16<EM>n</EM>-round cipher is used,
taking 8<EM>n</EM>-byte keys. Although not as fast as level 0, these
are very secure.
<BR><BR>
<DL>
<DT> <B>Parameters:</B>
<DD> <CODE>level - </CODE>the ICE level of encryption
</DL>
</DL>
<HR>

<H2> Methods </H2>

<A NAME="2"><H3> set </H3></A>
<CODE> public void set(byte key[]) </CODE>
<DL>
<DD> This method sets the key schedule for the <B>IceKey</B>. This should
be called before any encryption or decryption is done, or the results
will not be secure. The number of key bytes used depends on the level
of encryption set in the constructor. For levels 0 and 1, 8 bytes are
used. For levels <EM>n</EM> > 1, 8<EM>n</EM> bytes are used.
<DD> If the key array is not large enough to contain the required number
of bytes, an array bounds error will occur.
<BR><BR>
<DL>
<DT> <B>Parameters:</B>
<DD> <CODE>key - </CODE>the key used to encrypt and decrypt data
</DL>
</DL>

<A NAME="3"><H3> encrypt </H3></A>
<CODE> public byte[] encrypt(byte plaintext[], byte ciphertext[]) </CODE>
<DL>
<DD> This method is called to encrypt 8 bytes of the plaintext with the
key specified in the <A HREF="#2">set</A> method. The result is stored
in the ciphertext array, which is also the return value.
<BR><BR>
<DL>
<DT> <B>Parameters:</B>
<DD> <CODE>plaintext - </CODE>the data to be encrypted
<DD> <CODE>ciphertext - </CODE>the resulting encrypted data
</DL>
</DL>

<A NAME="4"><H3> decrypt </H3></A>
<CODE> public byte[] decrypt(byte ciphertext[], byte plaintext[]) </CODE>
<DL>
<DD> This method is called to decrypt 8 bytes of the plaintext with the
key specified in the <A HREF="#2">set</A> method. The result is stored
in the plaintext array, which is also the return value.
<BR><BR>
<DL>
<DT> <B>Parameters:</B>
<DD> <CODE>ciphertext - </CODE>the data to be decrypted
<DD> <CODE>plaintext - </CODE>the resulting decrypted data
</DL>
</DL>

<A NAME="5"><H3> clear </H3></A>
<CODE> public void clear() </CODE>
<DL>
<DD> This method zeroes out the key schedule, which prevents memory
snoopers from finding key information. It should only be called when
the key is no longer needed for encryption or decryption.
</DL>

<A NAME="6"><H3> keySize </H3></A>
<CODE> public int keySize() </CODE>
<DL>
<DD> This method returns the key size, in bytes.
</DL>

<A NAME="7"><H3> blockSize </H3></A>
<CODE> public int blockSize() </CODE>
<DL>
<DD> This method returns the block size, in bytes. The value is always 8.
</DL>

<HR>
<DIV ALIGN=RIGHT>
<FONT SIZE=-1>
Document written by Matthew Kwan, 25 March 1997 <BR>
Please send any comments or corrections to
<A HREF="mailto:mkwan@darkside.com.au">mkwan@darkside.com.au</A>
</FONT>
</DIV>

</BODY>
</HTML>
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close