| Constructor and Description |
|---|
OnchainSecrets(Roster roster,
Darc admin)
Creates a new OnchainSecrets class and creates a new skipchain.
|
OnchainSecrets(Roster roster,
SkipblockId ocsID)
Creates a new OnchainSecrets class that attaches to an existing skipchain.
|
| Modifier and Type | Method and Description |
|---|---|
SkipblockId |
SkipBlock.getId() |
SkipblockId |
SkipBlock.getSkipchainId() |
| Constructor and Description |
|---|
Sha256id(byte[] id) |
SkipblockId(byte[] id) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
Ed25519Point.data() |
byte[] |
Point.data() |
static byte[] |
Encryption.decryptData(byte[] dataEnc,
byte[] keyMaterial)
This method decrypts the data using the same encryption-method
as is defined in the header of this class.
|
static byte[] |
Encryption.decryptData(com.google.protobuf.ByteString dataEnc,
byte[] keyMaterial)
Convenience method for use with googles-protobuf bytestring.
|
static Point |
Ed25519Point.embed(byte[] data) |
static byte[] |
Encryption.encryptData(byte[] data,
byte[] keyMaterial)
Encrypts the data using the encryption defined in the header.
|
| Constructor and Description |
|---|
keyIv(byte[] keyMaterial) |
| Modifier and Type | Method and Description |
|---|---|
void |
Darc.addOwner(Darc darc)
Adds an owner to the list of allowed signers.
|
void |
Darc.addOwner(Signer signer)
Adds a owner to the list of allowed signers.
|
void |
Darc.addUser(Darc darc)
Adds a user to the list of allowed signers.
|
void |
Darc.addUser(Signer signer)
Adds a user to the list of allowed signers.
|
Darc |
Darc.copy()
Creates a copy of the current darc and increases the version-number
by 1.
|
DarcId |
Darc.getBaseId()
Returns the id of the darc with version == 0.
|
DarcId |
Darc.getId()
Calculate the getId of the darc by calculating the sha-256 of the invariant
parts which excludes the delegation-signature.
|
Identity |
Signer.getIdentity()
Returns an identity of the signer.
|
Identity |
SignerEd25519.getIdentity()
Creates an identity of the signer.
|
Identity |
SignerX509EC.getIdentity()
Creates an identity of the signer.
|
byte[] |
SignaturePath.getPathMsg()
Returns the path as an array of bytes.
|
Scalar |
Signer.getPrivate()
Returns the private key of the signer, or throws a NoPrivateKey exception.
|
Scalar |
SignerX509EC.getPrivate()
Returns the private key of the signer, or throws a CothorityCryptoException.
|
Point |
Signer.getPublic()
Returns the public key of the signer or throws a NoPublicKey exception.
|
Point |
SignerX509EC.getPublic()
Returns the public key of the signer, or throws a CothorityCryptoException.
|
static Identity |
IdentityFactory.New(Darc darc)
Creates the corresponding identity to a darc.
|
static Identity |
IdentityFactory.New(DarcOCSProto.Identity proto)
Returns an instantiated identity that is stored in proto.
|
static Identity |
IdentityFactory.New(Signer signer)
Creates the corresponding identity to a signer.
|
void |
Darc.removeOwner(Darc darc) |
void |
Darc.removeOwner(Signer signer) |
void |
Darc.removeUser(Darc darc) |
void |
Darc.removeUser(Signer signer) |
void |
Darc.setEvolution(Darc previous,
Signer previousOwner)
To evolve a darc, the latest valid darc needs to sign the new darc.
|
void |
Darc.setEvolutionOffline(Darc previous,
SignaturePath path,
Signer previousOwner)
To evolve a darc, the latest valid darc needs to sign the new darc.
|
boolean |
DarcSignature.verify(byte[] msg,
Darc base)
Returns true if the signature verification is OK, false on an error.
|
boolean |
Darc.verifyEvolution(Darc previous)
Returns true if the current darc has correctly been evolved from the previous darc.
|
| Constructor and Description |
|---|
Darc(DarcOCSProto.Darc proto)
Returns a darc from a protobuf representation.
|
Darc(List<Identity> owners,
List<Identity> users,
byte[] data)
Initialize a darc by giving an owner that is allowed to evolve the darc
and a list of users allowed to sign actions on behalf of that darc.
|
Darc(Signer owner,
List<Signer> users,
byte[] data)
Overloaded function for convenience.
|
DarcId(byte[] id) |
DarcSignature(byte[] msg,
Darc darc,
Signer signer,
int role) |
DarcSignature(byte[] msg,
SignaturePath path,
Signer signer)
This will return a new DarcSignature by the signer on the message.
|
DarcSignature(DarcOCSProto.Signature proto)
Recreates a darc from a protobuf representation.
|
IdentityDarc(Darc darc)
Instantiates a IdentityDarc given a darc.
|
IdentityDarc(DarcOCSProto.IdentityDarc proto)
Instantiates a IdentityDarc given its protobuf representation.
|
IdentityEd25519(Signer signer)
Creates an IdentityEd25519 from a SignerEd25519.
|
IdentityX509EC(DarcOCSProto.IdentityX509EC proto)
Creates an IdentityX509EC from a protobuf representation.
|
IdentityX509EC(Signer signer)
Creates an IdentityEd25519 from a SignerEd25519.
|
SignaturePath(DarcOCSProto.SignaturePath proto) |
SignaturePath(Darc darc,
Signer signer,
int role)
Overloaded method for convenience.
|
SignaturePath(List<Darc> darcPath,
Signer signer,
int role)
Overloaded method for convenience.
|
SignaturePath(Signer signer,
int role)
For creating online paths that don't inlcude the previous darcs
but that need the path to be verified by the verifier itself.
|
| Modifier and Type | Method and Description |
|---|---|
InstanceId |
Instruction.deriveId(String what)
This function derives an instance ID from the instruction with the given string.
|
DarcId |
TransactionId.getDarcId() |
DarcId |
InstanceId.getDarcId() |
SubId |
TransactionId.getSubId() |
SubId |
InstanceId.getSubId() |
static SubId |
SubId.one()
Creates a sub ID with the first byte set to 1.
|
static SubId |
SubId.random() |
void |
Instruction.signBy(List<Signer> signers)
Have a list of signers sign the instruction.
|
static SubId |
SubId.zero()
Creates a sub ID with all bytes set to 0.
|
static InstanceId |
InstanceId.zero()
Creates an instance ID of all zeros.
|
| Constructor and Description |
|---|
InstanceId(byte[] id) |
InstanceId(DarcId did,
SubId sid) |
SubId(byte[] id) |
TransactionId(byte[] id) |
| Modifier and Type | Method and Description |
|---|---|
Instruction |
DarcInstance.evolveDarcInstruction(Darc newDarc,
Signer owner,
int pos,
int len)
Creates an instruction to evolve the darc in omniledger.
|
Instruction |
ValueInstance.evolveValueInstruction(byte[] newValue,
Signer owner,
int pos,
int len)
Creates an instruction to evolve the value in omniledger.
|
Darc |
DarcInstance.getDarc() |
DarcId |
DarcInstance.getId() |
byte[] |
ValueInstance.getValue() |
Instruction |
DarcInstance.spawnContractInstruction(String contractID,
Signer s,
List<Argument> args,
int pos,
int len)
Creates an instruction for spawning a contract.
|
| Modifier and Type | Method and Description |
|---|---|
Darc |
Darc.copy() |
Darc |
Darc.copyEvolve() |
DarcId |
Darc.getBaseId()
Gets the base-ID of the darc, i.e.
|
DarcId |
Darc.getId()
Calculate the getId of the darc by calculating the sha-256 of the invariant
parts which excludes the delegation-signature.
|
Identity |
Signer.getIdentity()
Returns an identity of the signer.
|
Identity |
SignerEd25519.getIdentity()
Creates an identity of the signer.
|
Identity |
SignerX509EC.getIdentity()
Creates an identity of the signer.
|
Scalar |
Signer.getPrivate()
Returns the private key of the signer, or throws a NoPrivateKey exception.
|
Scalar |
SignerX509EC.getPrivate()
Returns the private key of the signer, or throws a CothorityCryptoException.
|
Point |
Signer.getPublic()
Returns the public key of the signer or throws a NoPublicKey exception.
|
Point |
SignerX509EC.getPublic()
Returns the public key of the signer, or throws a CothorityCryptoException.
|
void |
Darc.increaseVersion()
Updates the version of the darc and clears any eventual signatures from previous
evolutions.
|
static Identity |
IdentityFactory.New(Darc darc)
Creates the corresponding identity to a darc.
|
static Identity |
IdentityFactory.New(DarcProto.Identity proto)
Returns an instantiated identity that is stored in proto.
|
static Identity |
IdentityFactory.New(Signer signer)
Creates the corresponding identity to a signer.
|
void |
Darc.setPrevId(Darc d) |
static DarcId |
DarcId.zero()
Creates a darc ID with all zeros.
|
| Constructor and Description |
|---|
Darc(byte[] buf) |
Darc(DarcProto.Darc proto) |
DarcId(byte[] id)
Constructs a darc ID from a byte array.
|
DarcId(com.google.protobuf.ByteString id)
Constructs a darc ID from ByteString.
|
IdentityDarc(Darc darc)
Instantiates a IdentityDarc given a darc.
|
IdentityDarc(DarcProto.IdentityDarc proto)
Instantiates a IdentityDarc given its protobuf representation.
|
IdentityEd25519(Signer signer)
Creates an IdentityEd25519 from a SignerEd25519.
|
IdentityX509EC(DarcProto.IdentityX509EC proto)
Creates an IdentityX509EC from a protobuf representation.
|
IdentityX509EC(Signer signer)
Creates an IdentityEd25519 from a SignerEd25519.
|
Signature(DarcProto.Signature sig) |
| Modifier and Type | Method and Description |
|---|---|
Darc |
OnchainSecrets.addIdentityToDarc(Darc darc,
Identity identity,
Signer signer,
int role)
Adds a new identity to an existing darc under the given role.
|
Darc |
OnchainSecrets.addIdentityToDarc(DarcId id,
Signer identity,
Signer signer,
int role)
Instead of giving a darc, this method will search for an existing darc given its id on the
skipchain.
|
Darc |
OnchainSecrets.addIdentityToDarc(Darc darc,
Signer identity,
Signer signer,
int role)
Overloaded method for convenience in case the identity is only available as a signer.
|
ReadRequestId |
OnchainSecretsRPC.createReadRequest(ReadRequest rr)
Requests read-access to a document from the cothority.
|
WriteRequest |
OnchainSecretsRPC.createWriteRequest(WriteRequest wr,
DarcSignature signature)
Creates a write request on the skipchain.
|
Darc |
OnchainSecretsRPC.getAdminDarc() |
SignaturePath |
OnchainSecrets.getDarcPath(DarcId base,
Signer identity,
int role)
Convenience method to pass a signer as identity and get the darc-path used in signatures.
|
DecryptKey |
OnchainSecretsRPC.getDecryptionKeyEphemeral(ReadRequestId id,
DarcSignature signature,
Point ephemeral)
Requests the re-encryption symmetricKey from the skipchain, but uses an ephemeral key
for it.
|
Document |
OnchainSecrets.getDocument(WriteRequestId wrId,
Signer reader)
Creates a read-request, if successful fetches the document from the skipchain and decodes the
keymaterial.
|
Document |
OnchainSecrets.getDocumentEphemeral(WriteRequestId wrId,
Signer reader)
Requests the re-encryption symmetricKey from the skipchain, but uses an ephemeral key
for it.
|
byte[] |
DecryptKey.getKeyMaterial(OCSProto.Write write,
Scalar reader) |
List<Darc> |
OnchainSecretsRPC.getLatestDarc(DarcId id)
Requests the whole chain of darcs up to the current latest darc.
|
DarcSignature |
WriteRequest.getSignature(OnchainSecretsRPC ocs,
Signer publisher)
Creates a correct signature-path starting from the admin darc and
signs that path to get a correct write-request.
|
WriteRequest |
OnchainSecrets.publishDocument(Document doc,
Signer writer)
Publishes a document given the Document and the writer with write-authorization.
|
Darc |
OnchainSecrets.removeIdentityFromDarc(Darc darc,
Identity identity,
Signer signer,
int role)
Remove identity from an existing darc under the given role.
|
void |
OnchainSecretsRPC.updateDarc(Darc newAccount)
Updates an existing account or adds a new account to the skipchain.
|
| Constructor and Description |
|---|
Document(byte[] data,
int keylen,
Darc readers)
Convenience method without the public data.
|
Document(byte[] data,
int keylen,
Darc readers,
byte[] dataPublic)
Creates a new document from data, creates a new Darc, a symmetric
symmetricKey and encrypts the data using CBC-RSA.
|
OnchainSecrets(Roster roster,
Darc admin)
Creates a new OnchainSecrets class and creates a new skipchain.
|
OnchainSecrets(Roster roster,
SkipblockId ocsID)
Creates a new OnchainSecrets class that attaches to an existing skipchain.
|
ReadRequest(OnchainSecretsRPC ocs,
WriteRequestId wrId,
Signer reader)
This fetches the write-request and the path for the reader to sign.
|
ReadRequestId(byte[] id) |
WriteRequest(byte[] data,
int keylen,
Darc owner)
Creates a new document from data, creates a new Darc, a symmetric
symmetricKey and encrypts the data using CBC-RSA.
|
WriteRequest(String data,
int keylen,
Darc owner)
Overloaded constructor for WriteRequest, but taking a string rather than
an array of bytes.
|
WriteRequestId(byte[] id) |
Copyright © 2018. All rights reserved.