2014-04-24 22:39:55 +00:00
|
|
|
package textsecure;
|
|
|
|
|
|
|
|
option java_package = "org.whispersystems.libaxolotl.state";
|
|
|
|
option java_outer_classname = "StorageProtos";
|
|
|
|
|
|
|
|
message SessionStructure {
|
|
|
|
message Chain {
|
2014-07-23 08:00:32 +00:00
|
|
|
optional bytes senderRatchetKey = 1;
|
|
|
|
optional bytes senderRatchetKeyPrivate = 2;
|
2014-04-24 22:39:55 +00:00
|
|
|
|
|
|
|
message ChainKey {
|
|
|
|
optional uint32 index = 1;
|
|
|
|
optional bytes key = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
optional ChainKey chainKey = 3;
|
|
|
|
|
|
|
|
message MessageKey {
|
|
|
|
optional uint32 index = 1;
|
|
|
|
optional bytes cipherKey = 2;
|
|
|
|
optional bytes macKey = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
repeated MessageKey messageKeys = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PendingKeyExchange {
|
|
|
|
optional uint32 sequence = 1;
|
|
|
|
optional bytes localBaseKey = 2;
|
|
|
|
optional bytes localBaseKeyPrivate = 3;
|
2014-07-23 08:00:32 +00:00
|
|
|
optional bytes localRatchetKey = 4;
|
|
|
|
optional bytes localRatchetKeyPrivate = 5;
|
2014-04-24 22:39:55 +00:00
|
|
|
optional bytes localIdentityKey = 7;
|
|
|
|
optional bytes localIdentityKeyPrivate = 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PendingPreKey {
|
2014-07-11 17:35:41 +00:00
|
|
|
optional uint32 preKeyId = 1;
|
|
|
|
optional int32 signedPreKeyId = 3;
|
|
|
|
optional bytes baseKey = 2;
|
2014-04-24 22:39:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
optional uint32 sessionVersion = 1;
|
|
|
|
optional bytes localIdentityPublic = 2;
|
|
|
|
optional bytes remoteIdentityPublic = 3;
|
|
|
|
|
|
|
|
optional bytes rootKey = 4;
|
|
|
|
optional uint32 previousCounter = 5;
|
|
|
|
|
|
|
|
optional Chain senderChain = 6;
|
|
|
|
repeated Chain receiverChains = 7;
|
|
|
|
|
|
|
|
optional PendingKeyExchange pendingKeyExchange = 8;
|
|
|
|
optional PendingPreKey pendingPreKey = 9;
|
|
|
|
|
|
|
|
optional uint32 remoteRegistrationId = 10;
|
|
|
|
optional uint32 localRegistrationId = 11;
|
|
|
|
|
|
|
|
optional bool needsRefresh = 12;
|
2014-07-05 19:47:01 +00:00
|
|
|
optional bytes aliceBaseKey = 13;
|
2014-07-07 19:37:01 +00:00
|
|
|
optional bytes verification = 14;
|
2014-04-24 22:39:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message RecordStructure {
|
|
|
|
optional SessionStructure currentSession = 1;
|
|
|
|
repeated SessionStructure previousSessions = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PreKeyRecordStructure {
|
|
|
|
optional uint32 id = 1;
|
|
|
|
optional bytes publicKey = 2;
|
|
|
|
optional bytes privateKey = 3;
|
2014-04-28 19:10:24 +00:00
|
|
|
}
|
|
|
|
|
2014-07-11 17:35:41 +00:00
|
|
|
message SignedPreKeyRecordStructure {
|
2014-07-05 19:47:01 +00:00
|
|
|
optional uint32 id = 1;
|
|
|
|
optional bytes publicKey = 2;
|
|
|
|
optional bytes privateKey = 3;
|
|
|
|
optional bytes signature = 4;
|
|
|
|
optional fixed64 timestamp = 5;
|
|
|
|
}
|
|
|
|
|
2014-04-28 19:10:24 +00:00
|
|
|
message IdentityKeyPairStructure {
|
|
|
|
optional bytes publicKey = 1;
|
|
|
|
optional bytes privateKey = 2;
|
2014-04-24 22:39:55 +00:00
|
|
|
}
|