Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.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:
Bing SU (nova.su@gmail.com), Werner Dittmann

Nested Class Summary
(package private)  class SRTPCipherF8.F8Context
          F8 mode encryption context, see RFC3711 section 4.1.2 for detailed description.
 
Constructor Summary
SRTPCipherF8()
           
 
Method Summary
static void deriveForIV(org.bouncycastle.crypto.BlockCipher f8Cipher, byte[] key, byte[] salt)
           
static void process(org.bouncycastle.crypto.BlockCipher cipher, byte[] data, int off, int len, byte[] iv, org.bouncycastle.crypto.BlockCipher 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

deriveForIV

public static void deriveForIV(org.bouncycastle.crypto.BlockCipher f8Cipher,
                               byte[] key,
                               byte[] salt)

process

public static void process(org.bouncycastle.crypto.BlockCipher cipher,
                           byte[] data,
                           int off,
                           int len,
                           byte[] iv,
                           org.bouncycastle.crypto.BlockCipher f8Cipher)

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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