Generated by JsDoc Toolkit 2.3.3-beta on Wed Nov 06 2013 17:43:37 GMT+0100 (MEZ)
HTML template: Codeview

Namespace sjcl.mode.ocb2

Phil Rogaway's Offset CodeBook mode, version 2.0. May be covered by US and international patents.
Defined in: ocb2.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static> <constant>  
sjcl.mode.ocb2.name
The name of the mode.
Method Summary
Method Attributes Method Name and Description
<static>  
sjcl.mode.ocb2.decrypt(prp, ciphertext, iv, adata, tlen, premac)
Decrypt in OCB mode.
<static>  
sjcl.mode.ocb2.encrypt(prp, plaintext, iv, adata, tlen, false)
Encrypt in OCB mode, version 2.0.
<static>  
sjcl.mode.ocb2.pmac(prp, adata)
PMAC authentication for OCB associated data.
Namespace Detail
sjcl.mode.ocb2

Author: Emily Stark, Mike Hamburg, Dan Boneh.
Field Detail
<static> <constant> sjcl.mode.ocb2.name
The name of the mode.
Method Detail
<static> sjcl.mode.ocb2.decrypt(prp, ciphertext, iv, adata, tlen, premac)
Decrypt in OCB mode.
Parameters:
{Object} prp
The block cipher. It must have a block size of 16 bytes.
{bitArray} ciphertext
The ciphertext data.
{bitArray} iv
The initialization value.
{bitArray} adata Optional, Default: []
The authenticated data.
{Number} tlen Optional, Default: 64
the desired tag length, in bits.
{boolean} premac Optional, Default: false
true if the authentication data is pre-macced with PMAC.
Throws:
{sjcl.exception.invalid}
if the IV isn't exactly 128 bits.
{sjcl.exception.corrupt}
if if the message is corrupt.
Returns:
The decrypted data, an array of bytes.
<static> sjcl.mode.ocb2.encrypt(prp, plaintext, iv, adata, tlen, false)
Encrypt in OCB mode, version 2.0.
Parameters:
{Object} prp
The block cipher. It must have a block size of 16 bytes.
{bitArray} plaintext
The plaintext data.
{bitArray} iv
The initialization value.
{bitArray} adata Optional, Default: []
The authenticated data.
{Number} tlen Optional, Default: 64
the desired tag length, in bits.
false Optional
premac 1 if the authentication data is pre-macced with PMAC.
Throws:
{sjcl.exception.invalid}
if the IV isn't exactly 128 bits.
Returns:
The encrypted data, an array of bytes.
<static> sjcl.mode.ocb2.pmac(prp, adata)
PMAC authentication for OCB associated data.
Parameters:
{Object} prp
The block cipher. It must have a block size of 16 bytes.
{bitArray} adata
The authenticated data.