net.ninthtest.crypto.helix
Interface HelixPrimitive

All Known Implementing Classes:
HelixDecryption, HelixEncryption

public interface HelixPrimitive

A cryptographic primitive for the Helix combined stream cipher and MAC function.

Version:
1.0
Author:
Matthew Zipay (mattz@ninthtest.info)
See Also:
Helix: Fast Encryption and Authentication in a Single Cryptographic Primitive

Method Summary
 int bufferSize()
          Returns the number of bytes that are currently buffered.
 byte[] feed(byte[] part)
          Processes the next sequence of input bytes.
 byte[] finish(byte[] part)
          Completes a Helix encryption/decryption operation.
 byte[] getGeneratedMac()
          Returns the MAC that was generated following a successful encryption/decryption operation.
 

Method Detail

feed

byte[] feed(byte[] part)
Processes the next sequence of input bytes.

Parameters:
part - the next sequence of bytes to be processed by this primitive
Returns:
an array of bytes representing plaintext or ciphertext, depending on the operation mode of this primitive

bufferSize

int bufferSize()
Returns the number of bytes that are currently buffered.

Returns:
the buffered byte count

finish

byte[] finish(byte[] part)
Completes a Helix encryption/decryption operation.

If this method completes successfully, the generated MAC can be retrieved using the getGeneratedMac() method.

Parameters:
part - the last input bytes to be fed
Returns:
the ciphertext (encryption) or plaintext (decryption) bytes

getGeneratedMac

byte[] getGeneratedMac()
Returns the MAC that was generated following a successful encryption/decryption operation.

Returns:
the generated MAC bytes


Copyright © 2010-2014 Matthew Zipay. All Rights Reserved.