All Packages Class Hierarchy This Package Previous Next Index
Class ajanta.agent.AppendOnlyContainer
java.lang.Object
|
+----ajanta.agent.AppendOnlyContainer
- public class AppendOnlyContainer
- extends Object
The read-only container mechanism is limited in utility to those parts
of the state that remain constant throughout the agent's travels. In
some situations, the agent needs to collect data from the sites it
visits, but also needs to prevent any subsequent modification of the
data. This could be termed as write-once data, although more
generally, it could be modified any number of times until the agent
decides that it should not be modifiable any further. More generally,
agents may need append-only logs as part of their
state. An append-only log, as the name implies, can only be appended
to, i.e., entries in the log cannot be deleted or modified. When a
data object needs to be "frozen", it can be inserted into such an
append-only log. If secrecy is also needed the item can be encrypted
with the agent's public key before it is stored in the log.
- See Also:
- ReadOnlyContainer
-
objs
-
-
signers
-
-
signs
-
-
AppendOnlyContainer(EGPublicKey, int)
-
Constructor requires the agent's creator to supply the Elgamal public
key of the agent which will be used to sign the random number ( nonce)
for initialization.
-
checkIn(Object, byte[], URN)
- checkIn method is used to insert an object "X" (of any type) into an
AppendOnlyContainer.
-
verify(EGPrivateKey)
- When the agent returns home, the owner can use the verify method
to ensure that the AppendOnlyContainer has not been tampered with.
objs
public Vector objs
signs
public Vector signs
signers
public Vector signers
AppendOnlyContainer
public AppendOnlyContainer(EGPublicKey key,
int random)
- Constructor requires the agent's creator to supply the Elgamal public
key of the agent which will be used to sign the random number ( nonce)
for initialization. This nonce is not known to any server other than
the agent's home site, and must be kept secret.
- Parameters:
- key - Agent's Elgamal public key to be used for signing
- random - any random integer number
checkIn
public void checkIn(Object X,
byte sig[],
URN server)
- checkIn method is used to insert an object "X" (of any type) into an
AppendOnlyContainer. The check-in procedure requests the current
server to sign the object using its own private key.
- Parameters:
- X - object to be inserted
- sig - signed byte array
- server - URN of the current server
verify
public int verify(EGPrivateKey privkey) throws SecurityException
- When the agent returns home, the owner can use the verify method
to ensure that the AppendOnlyContainer has not been tampered with.
- Parameters:
- key - The Elgamal private key for the agent.
- Returns:
- It returns a number and
this number should be compared with the original random number passed to the constructor
(which must therefore,be stored by the agent's creator for later verification).
If it does not match, a security exception can be thrown. One limitation of this
scheme is that the verification process requires the agent's private key, and can
thus only be done by the agent's home site (or some other site trusted
by its owner).
All Packages Class Hierarchy This Package Previous Next Index