corda / net.corda.core.crypto

Package net.corda.core.crypto

Types

AbstractParty abstract class AbstractParty

An AbstractParty contains the common elements of Party and AnonymousParty, specifically the owning key of the party. In most cases Party or AnonymousParty should be used, depending on use-case.

AnonymousParty class AnonymousParty : AbstractParty

The AnonymousParty class contains enough information to uniquely identify a Party while excluding private information such as name. It is intended to represent a party on the distributed ledger.

CertificateStream class CertificateStream
CompositeKey sealed class CompositeKey

A tree data structure that enables the representation of composite public keys.

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 isn't used currently, but experience from Bitcoin suggests such a feature is useful, especially when building partially signed transactions.

DummyPublicKey class DummyPublicKey : PublicKey, Comparable<PublicKey>
MerkleTree sealed class MerkleTree

Creation and verification of a Merkle Tree for a Wire Transaction.

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 won't 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 class Party : AbstractParty

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 CompositeKey, which combines multiple cryptographic public key primitives into a tree structure.

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.

X509Utilities object X509Utilities

Exceptions

MerkleTreeException class MerkleTreeException : Exception

Extensions for External Classes

java.security.KeyPair
java.security.PrivateKey
java.security.PublicKey
kotlin.ByteArray
kotlin.String
kotlin.collections.Iterable
org.bouncycastle.asn1.x500.X500Name

Properties

NullCompositeKey val NullCompositeKey: CompositeKey
ed25519Curve val ed25519Curve: EdDSANamedCurveSpec

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): EdDSAPublicKey
sha256 fun OpaqueBytes.sha256(): SHA256