public class OnchainSecretsRPC extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Darc |
adminDarc |
protected SkipblockId |
ocsID |
protected Roster |
roster |
protected Point |
X |
| Modifier and Type | Method and Description |
|---|---|
ReadRequestId |
createReadRequest(ReadRequest rr)
Requests read-access to a document from the cothority.
|
void |
createSkipchains(Darc writers)
Creates a new skipchain and sets up a new ocs-shard.
|
WriteRequest |
createWriteRequest(WriteRequest wr,
DarcSignature signature)
Creates a write request on the skipchain.
|
Darc |
getAdminDarc() |
SignaturePath |
getDarcPath(DarcId base,
Identity identity,
int role)
Gets a darc-path starting from the base to the identity given.
|
DecryptKey |
getDecryptionKey(ReadRequestId id)
Requests the re-encryption symmetricKey from the skipchain.
|
DecryptKey |
getDecryptionKeyEphemeral(ReadRequestId id,
DarcSignature signature,
Point ephemeral)
Requests the re-encryption symmetricKey from the skipchain, but uses an ephemeral key
for it.
|
SkipblockId |
getGenesis() |
SkipblockId |
getID() |
List<Darc> |
getLatestDarc(DarcId id)
Requests the whole chain of darcs up to the current latest darc.
|
OCSProto.Read |
getRead(ReadRequestId id)
Requests the skipblock representing the read-request 'id' and returns
the corresponding OCSRead-structure.
|
Roster |
getRoster() |
Point |
getSharedPublicKey()
returns the shared symmetricKey of the DKG that must be used to encrypt the
symmetric encryption symmetricKey.
|
SkipchainProto.SkipBlock |
getSkipblock(SkipblockId id)
Returns the skipblock from the skipchain, given its id.
|
OCSProto.Transaction |
getTransaction(SkipblockId id)
Returns the transaction of a given skipblock, given the id of the block.
|
OCSProto.Write |
getWrite(WriteRequestId id)
Requests the skipblock representing the write-request 'id' and returns
the corresponding OCSWrite-structure.
|
Point |
getX() |
void |
updateDarc(Darc newAccount)
Updates an existing account or adds a new account to the skipchain.
|
boolean |
verify()
Contacts all nodes in the cothority and returns true only if _all_
nodes returned OK.
|
protected SkipblockId ocsID
protected Point X
protected Darc adminDarc
protected Roster roster
public boolean verify()
public void createSkipchains(Darc writers) throws CothorityCommunicationException
writers - the darc of allowed writers to the skipchain.CothorityCommunicationException - in case of communication difficultiespublic void updateDarc(Darc newAccount) throws CothorityCommunicationException, CothorityCryptoException
newAccount - the new account to be added to the skipchain.CothorityCommunicationException - in case of communication difficultiesCothorityCryptoExceptionpublic Point getSharedPublicKey() throws CothorityCommunicationException
CothorityCommunicationException - in case of communication difficultiespublic WriteRequest createWriteRequest(WriteRequest wr, DarcSignature signature) throws CothorityCommunicationException, CothorityCryptoException
wr - the write-request to store on the skipchainsignature - the publisher with the right to sell read-access to the documentCothorityCommunicationException - in case of communication difficultiesCothorityCryptoExceptionpublic SignaturePath getDarcPath(DarcId base, Identity identity, int role) throws CothorityCommunicationException
base - where to start the pathidentity - which identity to findCothorityCommunicationException - in case of communication difficultiespublic ReadRequestId createReadRequest(ReadRequest rr) throws CothorityCommunicationException, CothorityCryptoException
rr - the prepared read requestCothorityCommunicationExceptionCothorityCryptoExceptionpublic SkipchainProto.SkipBlock getSkipblock(SkipblockId id) throws CothorityCommunicationException
id - the id of the skipblockCothorityCommunicationException - in case of communication difficultiespublic OCSProto.Transaction getTransaction(SkipblockId id) throws CothorityCommunicationException
id - the id of the skipblockCothorityCommunicationException - in case of communication difficultiespublic OCSProto.Write getWrite(WriteRequestId id) throws CothorityCommunicationException
id - the id of the write-requestCothorityCommunicationException - in case of communication difficultiespublic OCSProto.Read getRead(ReadRequestId id) throws CothorityCommunicationException
id - the id of the read-requestCothorityCommunicationException - in case of communication difficultiespublic DecryptKey getDecryptionKey(ReadRequestId id) throws CothorityCommunicationException
TODO: depending on how we decide to implement the access-rights, this might go away.
id - the read-idCothorityCommunicationException - in case of communication difficultiespublic DecryptKey getDecryptionKeyEphemeral(ReadRequestId id, DarcSignature signature, Point ephemeral) throws CothorityCommunicationException, CothorityCryptoException
id - the read-idsignature - on the read-darc from the write-requestephemeral - the ephemeral public key to useCothorityCommunicationException - in case of communication difficultiesCothorityCryptoExceptionpublic List<Darc> getLatestDarc(DarcId id) throws CothorityCommunicationException, CothorityCryptoException
id - one of the darcs IDs.CothorityCommunicationExceptionCothorityCryptoExceptionpublic SkipblockId getGenesis()
public Darc getAdminDarc() throws CothorityCryptoException, CothorityCommunicationException
public SkipblockId getID()
public Point getX()
public Roster getRoster()
Copyright © 2018. All rights reserved.