JCrypTool (JCT) is platform-independent and runs under Linux, Mac and Windows. One focus are post-quantum (signature) algorithms. CrypTool-Online (CTO) was released in spring 2009. Here you can try out in a browser (on a PC or a smartphone) different algorithms.
Figure out whether your Mac is running on a 32-bit or 64-bit processor (you can tell if it’s 32 or 64 by going to about this mac and comparing your processor to the processors on the list of the link above.) Click the link for your system from this page. NOTE: Make sure to get the latest version. It’s currently 2.5.0. Typically, it behaves like a hash function: a minor change in the message or in the key results to totally different MAC value.It should be practically infeasible to change the key or the message and get the same MAC value.MAC codes, like hashes, are irreversible: it is impossible to recover the original message or the key from the MAC code.MAC algorithms are also known as 'keyed hash.
Encrypto lets you encrypt files before sending them to friends or coworkers. Drop a file into Encrypto, set a password, and then send it with added security.
Secure any file with AES-256 encryption
Encrypto takes any file or folder and adds AES-256 encryption to it. With encryption, you know your file is incredibly secure and that only the right person can access it.
Create a password hint
Rather than relay a password to the recipient, include a unique, embedded password hint that only they would be able to decipher.
Send files securely
Send encrypted files via email, Messages, AirDrop, Dropbox, carrier pigeon with USB stick — however you send them, your files are protected.
Or save them to disk
With Encrypto, not only can you encrypt and share files, but you can also save them to your own disk. Select your files, put them through Encrypto, and voilà — they’re protected.
Don't take our word for it
Encrypto
Get your own private cryptographer
If you haven’t been living on Mars these last years, having a data encryption strategy is a must. Let Encrypto be part of it. It's easy to use and impossible to hack. Download and give it a spin right now.
Subscribe to know first
Thanks for signing up!
You’re almost done. Now, please check your email.
Oracle Crypto Software Development Kit (SDK) allows Java developers to create applications that ensure data security and integrity.
Note:
The use of the Oracle Crypto library is not recommended with Release 11gR1 and higher. Instead, use the standard JCE interface for all cryptographic operations.
However, for ASN.1 parsing you should continue to use the Oracle Crypto library, as there are no standard APIs in the JDKs for that task.
For more information, see these resources:
JDK documentation on using the JCE interfaces at
http://www.oracle.com/technetwork/java/index.html
This chapter contains the following topics:
- About Oracle Crypto Features and Benefits
Oracle Crypto supports public key cryptography algorithms, digital signature algorithms, key exchange algorithms, symmetric cryptography algorithms, message digest algorithms, MAC algorithms, and methods for building and parsing ASN.1 objects. - About the Oracle Crypto Packages
Oracle Crypto contains packages of basic cryptographic primitives, utility classes for handling mathematical functions, various other utility classes, and facilities for reading and writing both BER-encoded and DER-encoded ASN.1 structures. - Setting Up Your Oracle Crypto Environment
In order to use the Oracle Crypto SDK, your system must have the Java Development Kit (JDK) version 1.6 or higher. YourCLASSPATH
environment variable must contain the full path and file names to the required jar and class files. - Understanding and Using Core Classes and Interfaces of Oracle Crypto
Oracle Crypto consists of multiple core classes and interfaces in the categories of Key Classes, Key Generation Classes, Cipher Classes, Signature Classes, Message Digest Classes, Key Agreement Class, and Pseudo-Random Number Generator Classes. - The Oracle Crypto and Crypto FIPS Java API References
Oracle Fusion Middleware Java API Reference for Oracle Security Developer Tools guide explains the classes and methods for Oracle Crypto and Oracle Crypto FIPS.
2.1 About Oracle Crypto Features and Benefits
Oracle Crypto supports public key cryptography algorithms, digital signature algorithms, key exchange algorithms, symmetric cryptography algorithms, message digest algorithms, MAC algorithms, and methods for building and parsing ASN.1 objects.
Oracle Crypto provides the following features:
Public key cryptography algorithms such as RSA
Digital signature algorithms such as DSA and RSA
Key exchange algorithms such as Diffie-Hellman
Symmetric cryptography algorithms such as Blowfish, AES, DES, 3DES, RC2, and RC4
Message digest algorithms such as MD2, MD4, MD5, SHA-1, SHA-256, SHA-384, and SHA-512
MAC algorithms such as HMAC-MD5 and HMAC-SHA-1
Methods for building and parsing ASN.1 objects
2.2 About the Oracle Crypto Packages
Oracle Crypto contains packages of basic cryptographic primitives, utility classes for handling mathematical functions, various other utility classes, and facilities for reading and writing both BER-encoded and DER-encoded ASN.1 structures.
Oracle Crypto contains the following packages:
oracle.security.crypto.core
- Basic cryptographic primitivesoracle.security.crypto.core.math
- Utility classes for handling mathematical functionsoracle.security.crypto.util
- Various utility classesoracle.security.crypto.asn1
- Facilities for reading and writing both BER-encoded and DER-encoded ASN.1 structures
2.3 Setting Up Your Oracle Crypto Environment
In order to use the Oracle Crypto SDK, your system must have the Java Development Kit (JDK) version 1.6 or higher. Your CLASSPATH
environment variable must contain the full path and file names to the required jar and class files.
Make sure that the osdt_core.jar
file is included in your CLASSPATH
.
For example, your CLASSPATH
might look like this:
See Also:
2.4 Understanding and Using Core Classes and Interfaces of Oracle Crypto
Oracle Crypto consists of multiple core classes and interfaces in the categories of Key Classes, Key Generation Classes, Cipher Classes, Signature Classes, Message Digest Classes, Key Agreement Class, and Pseudo-Random Number Generator Classes.
This section provides information and code samples for using the core classes and interfaces of Oracle Crypto. The following sections explain it further:
- About Oracle Crypto Key Classes
Oracle Crypto provides multiple classes and interfaces to work with keys. - Using the Oracle Crypto Key Generation Classes
Oracle Crypto provides classes for key generation. - Using Oracle Crypto Cipher Classes
Oracle Crypto provides classes for symmetric ciphers, RSA cipher, and methods for password based encryption. - Using the Oracle Crypto Signature Classes
Theoracle.security.crypto.core.Signature
abstract class provides methods to sign and verify signatures. The concrete classes extending theSignature
class are theRSAMDSignature
,DSA
and theECDSA
classes. - Using Oracle Crypto Message Digest Classes
Oracle Crypto contains message digest classes to hash, digest and compute data. - Using the Oracle Crypto Key Agreement Class
Theoracle.security.crypto.core.KeyAgreement
class abstract class provides methods for public key agreement schemes such as Diffie-Hellman. The concrete classes extending theKeyAgreement
class are theDHKeyAgreement
and theECDHKeyAgreement
classes. - Using Oracle Crypto Pseudo-Random Number Generator Classes
In cryptography, random numbers are used to generate keys. Cryptographic systems need cryptographically strong (pseudo) random numbers that cannot be guessed by an attacker. Oracle Crypto provides pseudo-random number generator (PRNG) classes.
2.4.1 About Oracle Crypto Key Classes
Oracle Crypto provides multiple classes and interfaces to work with keys.
These classes and interfaces are:
- The oracle.security.crypto.core.Key Interface
- The oracle.security.crypto.core.PrivateKey Interface
- The oracle.security.crypto.core.PublicKey Interface
- The oracle.security.crypto.core.SymmetricKey Class
Parent topic:Understanding and Using Core Classes and Interfaces of Oracle Crypto
2.4.1.1 The oracle.security.crypto.core.Key Interface
This interface represents a key which may be used for encryption or decryption, for generating or verifying a digital signature, or for generating or verifying a MAC. A key may be a private key, a public key, or a symmetric key.
2.4.1.2 The oracle.security.crypto.core.PrivateKey Interface
This interface represents a private key which may be an RSAPrivateKey
, a DSAPrivateKey
, a DHPrivateKey
, an ECPrivateKey
or a PrivateKeyPKCS8
instance that holds an encrypted private key.
2.4.1.3 The oracle.security.crypto.core.PublicKey Interface
This interface represents a public key which may be a RSAPublicKey
, a DSAPublicKey
, a DHPublicKey
or a ECPublicKey
instance.
2.4.1.4 The oracle.security.crypto.core.SymmetricKey Class
This class represents a symmetric key which may be used for encryption, decryption or for MAC operations.
2.4.2 Using the Oracle Crypto Key Generation Classes
Oracle Crypto provides classes for key generation.
- Using the oracle.security.crypto.core.KeyPairGenerator Class
- Using the oracle.security.crypto.core.SymmetricKeyGenerator Class
Parent topic:Understanding and Using Core Classes and Interfaces of Oracle Crypto
2.4.2.1 Using the oracle.security.crypto.core.KeyPairGenerator Class
This abstract class is used to generate key pairs such as RSA, DSA, Diffie-Hellman or ECDSA key pairs.
To get a new key pair generator, create a new instance of KeyPairGenerator
by calling the static getInstance()
method with an AlgorithmIdentifier
object as a parameter. This example shows how to create a new KeyPairGenerator
instance:
This creates a KeyPairGenerator
object from one of the concrete classes: RSAKeyPairGenerator
, DSAKeyPairGenerator
, DHKeyPairGenerator
, or ECKeyPairGenerator
.
Initialize the key pair generator by using one of the initialize()
methods. Generate the key pair with the generateKeyPair()
method. This example shows how to initialize the key pair generator and then generate a key pair:
Save the keys using the output()
method, or in the case of the private key, encrypt it and save it using the PrivateKeyPKCS8
class. This example shows how to save a key pair.
Parent topic:Using the Oracle Crypto Key Generation Classes
2.4.2.2 Using the oracle.security.crypto.core.SymmetricKeyGenerator Class
This class generates symmetric key pairs such as Blowfish, DES, 3DES, RC4, RC2, AES, and HMAC keys.
To get a new symmetric key generator, create a new instance of SymmetricKeyGenerator
by calling the static getInstance()
method with an AlgorithmIdentifier
object as a parameter. This example shows how to create a new SymmetricKeyGenerator
instance:
Generate the key pair with the generateKey()
method. You can then save the key by using the getEncoded()
method. This example shows how to generate and save a symmetric key pair.
Parent topic:Using the Oracle Crypto Key Generation Classes
2.4.3 Using Oracle Crypto Cipher Classes
Oracle Crypto provides classes for symmetric ciphers, RSA cipher, and methods for password based encryption.
The Oracle Crypto Cipher classes and interfaces are divided into the following categories:
- Using Symmetric Ciphers
- Using the RSA Cipher
- Using Password Based Encryption (PBE)
Parent topic:Understanding and Using Core Classes and Interfaces of Oracle Crypto
2.4.3.1 Using Symmetric Ciphers
The symmetric ciphers are made up of two categories: the block ciphers (such as Blowfish, DES, 3DES, RC2, and AES) and the stream ciphers (such as RC4).
A symmetric cipher can be used for four types of operations:
Encryption of raw data. Use one of the
encrypt()
methods by passing data to be encrypted.Decryption of encrypted data. Use one of the
decrypt()
methods by passing encrypted data to be decrypted.Wrapping of private or symmetric keys. Use one of the
wrapKey()
methods by passing the private or symmetric key to be encrypted.Unwrapping of private or symmetric encrypted keys. Use either the
unwrapPrivateKey()
or theunwrapSymmetricKey()
method by passing the encrypted private or symmetric key to be decrypted.
The concrete block cipher classes extend the abstract oracle.security.crypto.core.BlockCipher
class, which extends the oracle.security.crypto.core.Cipher
class. The stream cipher classes directly extend the oracle.security.crypto.core.Cipher
class.
To create a new instance of Cipher
, call the static getInstance()
method with an AlgorithmIdentifier
and a Key
object as parameters.
This example shows how to create a new Cipher instance. First an RC4 object is created and initialized with the specified key. Second a block cipher DES object is created and initialized with the specified key and padding. This creates a cipher and initializes it with the passed parameters. To re-initialize an existing cipher, call one of the initialize()
methods.
When using CBC ciphers, the AlgorithmIdentifier
object may hold cryptographic parameters such as the initialization vector (IV) or the effective key length for RC2 ciphers. To specify these parameters when creating or initializing block ciphers, build a CBCAlgorithmIdentifier
object or RC2AlgorithmIdentifier
object with the cryptographic parameters. This example shows how to create and initialize a CBC cipher and a RC2 cipher.
2.4.3.2 Using the RSA Cipher
The RSA cipher is an implementation of PKCS#1 v2.0 that supports the RSAES-OAEP and RSAES-PKCS1-v1_5 encryption schemes. According to the specification, RSAES-OAEP is recommended for new applications, and RSAES-PKCS1-v1_5 is included only for compatibility with existing applications and protocols.
The encryption schemes are used to combine RSA encryption and decryption primitives with an encoding method. Encryption and decryption can only be done through the methods encrypt(byte[])
and decrypt(byte[])
.
You can use an RSA cipher for four types of operations:
Encryption of raw data. Use one of the
encrypt()
methods by passing data to be encrypted.Decryption of encrypted data. Use one of the
decrypt()
methods by passing encrypted data to be decrypted.Wrapping of keys. Use the
wrapKey()
method by passing the key to be encrypted.Unwrapping of encrypted keys. Use the
unwrapSymmetricKey()
method by passing the encrypted key to be decrypted.
To create a new instance of Cipher
, call the static getInstance()
method with AlgorithmIdentifier
and Key
objects as parameters. This example demonstrates how to create an RSApkcs1
object and initialize it with the specified key. The cipher can then be used to encrypt or decrypt data.
When using RSA ciphers, the AlgorithmIdentifier
object may hold cryptographic parameters such as the mask generation function for RSAES-OAEP. To specify these parameters when creating or initializing RSA ciphers, build an OAEPAlgorithmIdentifier
, or use the default one located in the oracle.security.crypto.core.AlgID
interface.
2.4.3.3 Using Password Based Encryption (PBE)
The abstract oracle.security.crypto.core.PBE
class provides methods for Password Based Encryption (PBE) operations. The concrete classes extending the PBE are the PKCS5PBE
and PKCS12PBE
classes.
You may use a PBE object for four types of operations:
Encryption of raw data. For example:
Decryption of encrypted data. For example:
Wrapping of private or symmetric keys. For example:
Unwrapping of private or symmetric encrypted keys. For example:
To create a new instance of PBE, call the static getInstance()
method with a PBEAlgorithmIdentifier
object as a parameter. For example:
This will create a PKCS5PBE
object and initialize it with the specified PBE algorithm. The PBE can then be used to encrypt or decrypt data, wrap or unwrap keys.
When using PBE objects, the AlgorithmIdentifier
object may hold cryptographic parameters such as the salt or the iteration count as well as the ASN.1 Object Identifier specifying the PBE algorithm to use. To specify these parameters when creating or initializing PBEs, build a PBEAlgorithmIdentifier
object with the cryptographic parameters.
Here is an example of creating a PBE object:
2.4.4 Using the Oracle Crypto Signature Classes
The oracle.security.crypto.core.Signature
abstract class provides methods to sign and verify signatures. The concrete classes extending the Signature
class are the RSAMDSignature
, DSA
and the ECDSA
classes.
The algorithms available for signature operations are:
For RSA:
AlgID.md2WithRSAEncryption
,AlgID.md5WithRSAEncryption
andAlgID.sha_1WithRSAEncryption
For DSA:
AlgID.dsaWithSHA1
For ECDSA:
AlgID.ecdsaWithSHA1
To create a new instance of Signature
, call the static getInstance()
method with an AlgorithmIdentifier
and a PrivateKey
or PublicKey
objects as parameters. This example shows how to create a new Signature
object and initialize it with the specified algorithm.
This example shows how to set the keys for the Signature
objects and set the document to be signed or verified.
This example shows how to compute the signature using the private key or to verify the signature using the public key and the signature bytes.
Parent topic:Understanding and Using Core Classes and Interfaces of Oracle Crypto
2.4.5 Using Oracle Crypto Message Digest Classes
Iis Crypto For Mac
Oracle Crypto contains message digest classes to hash, digest and compute data.
Oracle Crypto provides the following message digest classes:
- Using the oracle.security.crypto.core.MessageDigest Class
- Using the oracle.security.crypto.core.MAC Class
Parent topic:Understanding and Using Core Classes and Interfaces of Oracle Crypto
2.4.5.1 Using the oracle.security.crypto.core.MessageDigest Class
The MessageDigest
abstract class provides methods to hash and digest data. The concrete classes extending the MessageDigest
class are the MD2
, MD4
, MD5
and the SHA
classes.
The available algorithms for message digest operations are: AlgID.md2
, AlgID.md4
, AlgID.md5
, AlgID.sha_1
, AlgID.sha_256
, AlgID.sha_384
and AlgID.sha_512
.
The basic process for creating a message digest is as follows:
- Create a new instance of
MessageDigest
by calling the staticgetInstance()
method with anAlgorithmIdentifier
object as a parameter. - Add the data to be digested.
- Compute the hash value.
This example shows how to create an MD5 message digest object.
Parent topic:Using Oracle Crypto Message Digest Classes
2.4.5.2 Using the oracle.security.crypto.core.MAC Class
The MAC
abstract class provides methods to compute and verify a Message Authentication Code (MAC). The concrete class extending the MAC
is the HMAC
class.
The available algorithms for MAC operations are: AlgID.hmacMD5
and AlgID.hmacSHA
.
The basic process for creating a MAC is as follows:
- Create a new instance of
MAC
by calling the staticgetInstance()
method with anAlgorithmIdentifier
and aSymmetricKey
object as a parameter. - Add the data to be digested.
- Compute the MAC value and verify it.
This example shows how to create a new HMAC object with the HMAC-SHA1 algorithm.
Parent topic:Using Oracle Crypto Message Digest Classes
2.4.6 Using the Oracle Crypto Key Agreement Class
The oracle.security.crypto.core.KeyAgreement
class abstract class provides methods for public key agreement schemes such as Diffie-Hellman. The concrete classes extending the KeyAgreement
class are the DHKeyAgreement
and the ECDHKeyAgreement
classes.
The available algorithms for key agreement operations are: AlgID.dhKeyAgreement
and ECDHKeyAgreement
(Elliptic Curve Diffie-Hellman key agreement).
The basic process for key agreement is as follows:
- Create a new instance of
KeyAgreement
by calling the staticgetInstance()
method with anAlgorithmIdentifier
object as a parameter. - Set the local private key and the other party's public key.
- Compute the shared secret value.
Parent topic:Understanding and Using Core Classes and Interfaces of Oracle Crypto
2.4.7 Using Oracle Crypto Pseudo-Random Number Generator Classes
In cryptography, random numbers are used to generate keys. Cryptographic systems need cryptographically strong (pseudo) random numbers that cannot be guessed by an attacker. Oracle Crypto provides pseudo-random number generator (PRNG) classes.
These pseudo-random number generator (PRNG) classes are:
- Using the oracle.security.crypto.core.RandomBitsSource class
- Using the oracle.security.crypto.core.EntropySource class
Crypto For Money
Parent topic:Understanding and Using Core Classes and Interfaces of Oracle Crypto
2.4.7.1 Using the oracle.security.crypto.core.RandomBitsSource class
RandomBitsSource
is an abstract class representing secure PRNG implementations. Note that, by the very nature of PRNGs, the security of their output depends on the amount and quality of seeding entropy used. Implementing classes should provide guidance as to their proper initialization and use. The concrete classes extending the RandomBitsSource
are the MD5RandomBitsSource
, SHA1RandomBitsSource
, and the DSARandomBitsSource
classes.
Create a new instance of RandomBitsSource
by calling the static getDefault()
method to return the default PRNG:
Mac Crypto Mining
A RandomBitsSource
object can also be created by instantiating one of the subclasses:
By default, a newly created PRNG created from a subclass will be seeded. To seed a generic RandomBitsSource
object, use one of the seed methods by using a byte array or an EntropySource
object:
The object is then ready to generate random data:
Parent topic:Using Oracle Crypto Pseudo-Random Number Generator Classes
2.4.7.2 Using the oracle.security.crypto.core.EntropySource class
The EntropySource
class provides a source of seed material for the PRNGs. The concrete classes extending the EntropySource
are the SpinnerEntropySource
and SREntropySource
classes.
Create a new instance of EntropySource
by calling the static getDefault()
method to return the default entropy source:
You can also create an EntropySource
object by instantiating one of the subclasses:
The entropy source is readied for use by using one of the generateByte
methods:
Parent topic:Using Oracle Crypto Pseudo-Random Number Generator Classes
Mac Message Authentication Code
2.5 The Oracle Crypto and Crypto FIPS Java API References
Oracle Fusion Middleware Java API Reference for Oracle Security Developer Tools guide explains the classes and methods for Oracle Crypto and Oracle Crypto FIPS.
You can access this guide at: