Skip to content

Commit 8eb2d68

Browse files
committed
Move encryption to the main I-D, fixes #401
1 parent cdcd667 commit 8eb2d68

3 files changed

Lines changed: 59 additions & 21 deletions

File tree

IETF-OCM-MLS.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,7 @@ with `shareWith` carrying the group's OCM Address. A federation share
380380
is otherwise a standard OCM share, carrying every field REQUIRED by
381381
[OCM] including the `protocol` object. All new server-to-server
382382
messages use the existing `/notifications` endpoint with new
383-
`notificationType` values. A single new field is added to the Share
384-
Creation Notification: `encryption` (optional, present only for
385-
encrypted resources), carrying all encryption-related parameters,
386-
including the `resourceId`.
383+
`notificationType` values.
387384

388385
# Discovery
389386

@@ -1099,14 +1096,14 @@ a given epoch.
10991096
The `resourceId` used in the AEAD associated data MUST be a stable
11001097
identifier for the underlying file, consistent across all groups it is
11011098
shared with. It identifies the resource, not a particular version of
1102-
it. This ensures that the FK unwrapped by members of any group correctly
1103-
decrypts the same ciphertext. The `providerId` values in separate share
1104-
notifications, for the same resource, MUST differ, per the `providerId`
1105-
definition in [OCM], but the `resourceId` in the AEAD associated data
1106-
MUST be the same. This means that the `providerId` MUST NOT be reused
1107-
as `resourceId`. The sending server is responsible for maintaining this
1108-
stable `resourceId` and MUST send it in the `encryption` object of the
1109-
share payload ({{share-creation}}).
1099+
it or a specific share. This ensures that the FK unwrapped by members
1100+
of any group correctly decrypts the same ciphertext. The `providerId`
1101+
values in separate share notifications, for the same resource, MUST
1102+
differ, per the `providerId` definition in [OCM], but the `resourceId`
1103+
in the AEAD associated data MUST be the same. This means that the
1104+
`providerId` MUST NOT be reused as `resourceId`. The sending server is
1105+
responsible for maintaining this stable `resourceId` and MUST send it
1106+
in the `encryption` object of the share payload ({{share-creation}}).
11101107

11111108
## File Key Wrapping {#file-key-wrapping}
11121109

@@ -1589,20 +1586,21 @@ Each notification MAY include the optional `encryption` field:
15891586
}
15901587
},
15911588
"encryption": {
1589+
"resourceId": "3a02538b-aa54-42f2-8853-a38996e211b1"
15921590
"scheme": "ocm-mls-1",
15931591
"cipher": "AES-256-GCM",
1594-
"resourceId": "3a02538b-aa54-42f2-8853-a38996e211b1"
15951592
}
15961593
}
15971594
~~~
15981595

1599-
The `encryption` field is OPTIONAL. If absent, the resource is
1600-
unencrypted and the share follows the standard OCM flow without
1601-
modification. If present, it carries all encryption-related parameters:
1602-
`scheme` identifies the encryption scheme, for which this document
1603-
defines `"ocm-mls-1"`; `resourceId` is the stable resource identifier
1604-
described in {{resource-id}}; and `cipher` (REQUIRED when `encryption`
1605-
is present) names the content AEAD that the resource is encrypted with
1596+
The `encryption` field is OPTIONAL as per [OCM] Share Creation
1597+
Notification specification. If absent, the resource is unencrypted.
1598+
If present, it MUST carry the encryption-related parameters according
1599+
to the [OCM] specification, where:
1600+
- `resourceId` is the stable resource identifier described in
1601+
{{resource-id}}
1602+
- `scheme` is to be set to `"ocm-mls-1"`
1603+
- `cipher` names the content AEAD that the resource is encrypted with
16061604
({{file-key-wrapping}}), one of the AEAD algorithms defined for HPKE
16071605
([RFC9180] Section 7.3): `"AES-128-GCM"`, `"AES-256-GCM"`, or
16081606
`"CHACHA20-POLY1305"`. The field signals that the FK is distributed via
@@ -1611,7 +1609,7 @@ epoch information is carried in the share notification. Member Servers
16111609
always hold the current wrapped FK for each `(resourceId, groupId)` pair
16121610
and use their current Group Key to unwrap it at access time.
16131611

1614-
The Group Owner Server is not involved in the delivery of OCM share
1612+
The Group Owner Server is not involved in the delivery of OCM Share
16151613
notifications. All other OCM notifications relating to a share, such as
16161614
share updates and share deletions, are likewise sent directly from the
16171615
sending server to each Member Server, referencing the share by its

IETF-OCM.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,17 @@ described in [OCM-IP].
10921092
share does not expire. A sender server MAY use it to signal that
10931093
the resource represents a cached copy of a dataset that was made
10941094
available for an efficient data transfer to the destination server.
1095+
* OPTIONAL encryption (object)
1096+
Optional JSON object with encryption information for the share. If
1097+
omitted, it is assumed that the resource is not encrypted. For
1098+
encrypted resources, the actual key material is to be exchanged out
1099+
of band, and this object MUST include:
1100+
- REQUIRED resourceId (string) - a unique identifier of the
1101+
underlying resource.
1102+
- REQUIRED scheme (string) - an identifier of the encryption scheme
1103+
used to encrypt the resource, such as "ocm-pgp-1".
1104+
- REQUIRED cipher (string) - the encryption algorithm used to encrypt
1105+
the resource as in [RFC9180] Section 7.3.
10951106
* REQUIRED protocol (object)
10961107
JSON object with specific options for each protocol.
10971108
The supported protocols are:
@@ -2215,6 +2226,10 @@ JSON Object Signing and Encryption (JOSE) and CBOR Object Signing
22152226
and Encryption (COSE)](https://datatracker.ietf.org/doc/html/rfc9864)",
22162227
October 2025.
22172228

2229+
[RFC9180] Barnes, R., Bhargavan, K., Lipp, B. and Wood, C. A. "[Hybrid
2230+
Public Key Encryption](https://datatracker.ietf.org/doc/html/rfc9180)",
2231+
February 2022.
2232+
22182233
## Informative References
22192234

22202235
[RFC3552] Rescorla, E. and Korver, B. "[Guidelines for Writing RFC Text

spec.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,31 @@ components:
603603
server MAY use the `expiration` to signal that the resource represents
604604
a cached copy of a dataset that was made available for an efficient
605605
data transfer to the destination server.
606+
encryption:
607+
type: object
608+
description: >
609+
Optional object with encryption information for the share. If omitted,
610+
it is assumed that the resource is not encrypted, whereas for encrypted
611+
resources, the key material has to be exchanged out of band, and this
612+
object MUST be present.
613+
required:
614+
- resourceId
615+
- scheme
616+
- cipher
617+
properties:
618+
resourceId:
619+
type: string
620+
description: >
621+
The unique identifier of the underlying resource. This MUST be the same
622+
for all shares of the same resource.
623+
scheme:
624+
type: string
625+
description: >
626+
An identifier of the encryption scheme used to encrypt the resource.
627+
cipher:
628+
type: string
629+
description: >
630+
The encryption algorithm used to encrypt the resource.
606631
protocol:
607632
type: object
608633
description: |

0 commit comments

Comments
 (0)