-
Notifications
You must be signed in to change notification settings - Fork 0
/
universal.proto
39 lines (34 loc) · 1.6 KB
/
universal.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
syntax="proto3";
package kript.api;
// An enumeration of different password hashing algorithms.
enum HashAlgorithm {
UNKNOWN_HASH_ALGORITHM = 0;
// Hash the utf-8 encoded password and utf-8 encoded salt using scrypt with N=16384, r=8, p=1, and derived key length = 256 bits
SCRYPT = 1;
// Hash the utf-8 encoded password and utf-8 encoded salt using PBKDF2 with SHA512, 20000 iterations, and a derived key length of 256 bits
PBKDF2_SHA_512 = 2;
// Hash the utf-8 encoded password and utf-8 encoded salt using Argon2id, with t=75, m=1024, p=1, T=32 (derived key length of 256 bits).
ARGON2 = 3;
}
// An enumeration of different symmetric encryption algorithms.
enum SEncryptionAlgorithm {
UNKNOWN_S_ENCRYPTION_ALGORITHM = 0;
// Encrypt using AES-256 with a given key and initialization vector, using CBC and PKCS7 padding. If the key is longer than 256 bits or the iv is longer than 128 bits, they are truncated. If they are shorter, they are zero-padded.
AES_256_CBC = 1;
// Encrypt using AES-256 with a given key and initialization vector, using GCM and having a 16-byte authentication tag appended to the cyphertext. If the key is longer than 256 bits or the iv is longer than 128 bits, they are truncated. If they are shorter, they are zero-padded.
AES_256_GCM = 2;
}
// An enumeration of different asymmetric encryption algorithms.
enum AEncryptionAlgorithm {
UNKNOWN_A_ENCRYPTION_ALGORITHM = 0;
// Encrypt/Decrypt using RSA with OAEP padding.
RSA = 1;
}
message AccessToken {
JWT jwt = 1;
}
// A representation of a JSON Web Token.
message JWT {
// The Base 64 encoded JWT.
string token = 1;
}