-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIMPLEMENTATION
28 lines (21 loc) · 1.11 KB
/
IMPLEMENTATION
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
Prerequisite
This file contains extended description of Encrypted Message Protocol
implementation by "go-emp" package, as required by Encrypted Message
Protocol 1.0 specification.
Description
Source code comes with this file contains implementation of Encrypted
Message Protocol in Go programming language.
Each message generated by given source code will be encoded using JSON
and packed by base64url, as recommended by protocol specification.
Each message will contain two fields: "alg" and "msg", as required by
protocol specification.
"alg" field can contain one of given encryption algorithm aliases:
- RSA-SHA256 - for RSA encrypted, SHA256 signed message
- RSA-SHA512 - for RSA encrypted, SHA512 signed message
- AES128 - for AES128 encrypted message with no signature
- AES256 - for AES256 encrypted message with no signature
"msg" field will contain message, encrypted according to "alg" encryption
algorithm, as required by protocol specification.
Each signed message will contain "sig" field. "sig" field will contain
signature string, hashed according to "alg" hashing algorithm, as
recommended by protocol specification.