Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Authenticated Encryption (AEAD) #2336

Open
20 of 25 tasks
maxsharabayko opened this issue May 19, 2022 · 1 comment
Open
20 of 25 tasks

[FR] Authenticated Encryption (AEAD) #2336

maxsharabayko opened this issue May 19, 2022 · 1 comment
Labels
[core] Area: Changes in SRT library core Epic Type: Enhancement Indicates new feature requests
Milestone

Comments

@maxsharabayko
Copy link
Collaborator

maxsharabayko commented May 19, 2022

Authenticated-Encryption with Associated-Data (AEAD) schemes provide confidentiality by encrypting the data, and also provide authenticity assurances by creating a MAC tag over the encrypted data. The MAC tag will ensure the data is not accidentally altered or maliciously tampered during transmission and storage [OpenSSL Wiki].

1. Select Supported Algorithms (GCM, CCM, etc.) ✔️

  • Selected AES GCM crypto mode.

There are a number of AEAD modes of operation. The modes include EAX, CCM, and GCM (RFC 5647).

AEAD parts [OpenSSL Wiki]:

  • Algorithm (currently only AES is supported by OpenSSL)
  • Mode (currently only GCM and CCM are supported by OpenSSL)
  • Key: keep using PBKDF2
  • Initialisation Vector (IV): keep the current algorithm? IV = (MSB(112, Salt) << 2) XOR (PktSeqNo)

2. Encrypt Data Packets

3. SRT API Changes

4. SRT Handshake Enhancements: Negotiate Encryption

5. Maximum Payload Size

AEAD requires placing an authentication tag along with the payload. In the case of GCM mode, the tag takes 16 bytes (CCM: 14 bytes). Thus maximum payload size has to be handled accordingly.
Also, decide if and how should this work with FEC.

6. FEC

Define how FEC and a packet filter, in general, should work with authenticated packets.
Just include the whole data packet?
Should the FEC packet be authenticated? Probably not, it would also complicate things a lot.

7. Integrate into the CRYSPR

The encryption provider library of SRT has to support AEAD (GCM mode).

8. Error Handling

8. Unit Tests

9. Application-level testing

Test different SRT versions work correctly with each other:

  1. Connection establishment w/o AEAD and valid encryption with one peer of an older SRT version.
  2. Connection rejection in AEAD configuration with one peer of an older SRT version.
  3. etc.

10. Update the IETF SRT Internet Draft.

@maxsharabayko maxsharabayko added Type: Enhancement Indicates new feature requests [core] Area: Changes in SRT library core labels May 19, 2022
@maxsharabayko maxsharabayko added this to the Next Release milestone May 19, 2022
@ethouris
Copy link
Collaborator

Basing on the possible application, there should be also 3 possibilities provided:

  1. Full signature. The whole packet is taken for the signature, the R flag must be set to 0 before checks. The signature cannot be passed through - the SRT re-routing machines would have to authenticate and replace the signature if needed.
  2. Payload passthrough. Only the payload is included, all other fields can be potentially altered, but this can be freely passed through and freely decided on timestamp passthrough.
  3. Timely payload passthrough. Payload and the timestamp are included. This can be freely passed through with the original unchecked signature, but the re-routing application must preserve the original timestamp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Epic Type: Enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

2 participants