SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.media.transform.srtp
Class SRTPCipherF8

java.lang.Object
  extended by net.java.sip.communicator.impl.media.transform.srtp.SRTPCipherF8

public class SRTPCipherF8
extends Object

SRTPCipherF8 implements SRTP F8 Mode AES Encryption (AES-f8). F8 Mode AES Encryption algorithm is defined in RFC3711, section 4.1.2. Other than Null Cipher, RFC3711 defined two two encryption algorithms: Counter Mode AES Encryption and F8 Mode AES encryption. Both encryption algorithms are capable to encrypt / decrypt arbitrary length data, and the size of packet data is not required to be a multiple of the AES block size (128bit). So, no padding is needed. Please note: these two encryption algorithms are specially defined by SRTP. They are not common AES encryption modes, so you will not be able to find a replacement implementation in common cryptographic libraries. As defined by RFC3711: F8 mode encryption is optional. mandatory to impl optional default ------------------------------------------------------------------------- encryption AES-CM, NULL AES-f8 AES-CM message integrity HMAC-SHA1 - HMAC-SHA1 key derivation (PRF) AES-CM - AES-CM We use AESCipher to handle basic AES encryption / decryption.

Author:
Werner Dittmann (Werner.Dittmann@t-online.de), Bing SU (nova.su@gmail.com)

Nested Class Summary
(package private) static class SRTPCipherF8.F8Context
          F8 mode encryption context, see RFC3711 section 4.1.2 for detailed description.
 
Constructor Summary
SRTPCipherF8()
           
 
Method Summary
static void process(org.bouncycastle.crypto.engines.AESFastEngine aesCipher, byte[] data, int off, int len, byte[] iv, byte[] key, byte[] salt, org.bouncycastle.crypto.engines.AESFastEngine f8Cipher)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SRTPCipherF8

public SRTPCipherF8()
Method Detail

process

public static void process(org.bouncycastle.crypto.engines.AESFastEngine aesCipher,
                           byte[] data,
                           int off,
                           int len,
                           byte[] iv,
                           byte[] key,
                           byte[] salt,
                           org.bouncycastle.crypto.engines.AESFastEngine f8Cipher)

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.