net.corda.core.crypto

## Package net.corda.core.crypto

### Types

DigitalSignature | `open class DigitalSignature : OpaqueBytes` A wrapper around a digital signature. The covering field is a generic tag usable by whatever is interpreting the signature. It isnt used currently, but experience from Bitcoin suggests such a feature is useful, especially when building partially signed transactions.
DummyPublicKey | `class DummyPublicKey : PublicKey, Comparable<PublicKey>`
NullPublicKey | `object NullPublicKey : PublicKey, Comparable<PublicKey>`
NullSignature | `object NullSignature : WithKey` A signature with a key and value of zero. Useful when you want a signature object that you know wont ever be used.
PartialMerkleTree | `class PartialMerkleTree` Building and verification of Partial Merkle Tree. Partial Merkle Tree is a minimal tree needed to check that a given set of leaves belongs to a full Merkle Tree.
Party | `data class Party` The Party class represents an entity on the network, which is typically identified by a legal name and public key that it can sign transactions under. As parties may use multiple keys for signing and, for example, have offline backup keys, the "public key" of a party is represented by a composite construct – a PublicKeyTree, which combines multiple cryptographic public key primitives into a tree structure.
PublicKeyTree | `sealed class PublicKeyTree` A tree data structure that enables the representation of composite public keys.
SecureHash | `sealed class SecureHash : OpaqueBytes` Container for a cryptographically secure hash value. Provides utilities for generating a cryptographic hash using different algorithms (currently only SHA-256 supported).
SignedData | `open class SignedData<T : Any>` A serialized piece of data and its signature. Enforces signature validity in order to deserialize the data contained within.
WhitelistTrustManager | `class WhitelistTrustManager : X509ExtendedTrustManager` Our TrustManager extension takes the standard certificate checker and first delegates all the chain checking to that. If everything is well formed we then simply add a check against our whitelist
WhitelistTrustManagerProvider | `object WhitelistTrustManagerProvider : Provider` Custom Security Provider that forces the TrustManagerFactory to be our custom one. Also holds the identity of the original TrustManager algorithm so that we can delegate most of the checking to the proper Java code. We simply add some more checks.
WhitelistTrustManagerSpi | `class WhitelistTrustManagerSpi : TrustManagerFactorySpi` Registered TrustManagerFactorySpi
X509Utilities | `object X509Utilities`

### Exceptions

MerkleTreeException | `class MerkleTreeException : Exception`

### Extensions for External Classes

java.security.KeyPair |
java.security.PrivateKey |
java.security.PublicKey |
kotlin.ByteArray |
kotlin.collections.Iterable |

### Properties

NullPublicKeyTree | `val NullPublicKeyTree: PublicKeyTree`
ed25519Curve | `val ed25519Curve: <ERROR CLASS>`

### Functions

entropyToKeyPair | `fun entropyToKeyPair(entropy: BigInteger): KeyPair` Returns a key pair derived from the given private key entropy. This is useful for unit tests and other cases where you want hard-coded private keys.
generateKeyPair | `fun generateKeyPair(): KeyPair` A simple wrapper that will make it easier to swap out the EC algorithm we use in future
newSecureRandom | `fun newSecureRandom(): SecureRandom`
parsePublicKeyBase58 | `fun parsePublicKeyBase58(base58String: String): <ERROR CLASS>`
registerWhitelistTrustManager | `fun registerWhitelistTrustManager(): Unit` Call this to change the default verification algorithm and this use the WhitelistTrustManager implementation. This is a work around to the fact that ArtemisMQ and probably many other libraries dont correctly configure the SSLParameters with setEndpointIdentificationAlgorithm and thus dont check that the certificate matches with the DNS entry requested. This exposes us to man in the middle attacks. The issue has been raised with ArtemisMQ: https://issues.apache.org/jira/browse/ARTEMIS-656
sha256 | `fun OpaqueBytes.sha256(): SHA256`