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

Implementation of MCD capability descriptor and SA-Attestation Object (SAAO) as per ISO/IEC JTC 1/SC 17/WG 4 N 4566 #89

Conversation

radumarias
Copy link
Contributor

Add module issuance::mcd with the structures for MCD capability descriptor and SA-Attestation Object (SAAO).

radumarias and others added 23 commits July 23, 2024 00:14
# Description

- Integrate `coset` crate.
- Crate module `cose`
where we have `Cose`
trait with some basic methods and implemented by `CoseSign1`
and `CoseMac0`
which are wrappers over coset analogous.
- Implement `SignatureAlgorithm` trait for `CoseSign1` and `CoseMac0`.

# Ref

https://linear.app/spruceid/issue/SKIT-448/iso-mdl-investigate-coset

# Changes

- Add `CoseSign1` and `CoseMac0` wrappers over coset analogous.
- Add `Cose` trait with some basic methods.
- Implement `SignatureAlgorithm` for `CoseSign1` and `CoseMac0`.
- Add a global map to hold signature payloads
as our flow returns a reference to the payload
and later that is signed externally.
- Serialize/deserialize `CoseSign1` and `CoseMac0`.
- Change signature flow to use the coset signature.
- Use `iana::Algorithm`.

## Other changes

None

# Reviewers, please pay special attention to…

The way `CoseSign1` is used.
Signature flow and global map
that hold signature payload, so we can return reference.

# Tested

Tested locally, running all tests.
Build with these targets:

```
aarch64-linux-android
armv7-linux-androideabi
i686-linux-android
wasm32-unknown-unknown
wasm32-wasi
x86_64-unknown-linux-gnu
i686-unknown-linux-gnu
x86_64-unknown-linux-musl
x86_64-pc-windows-gnu
i686-pc-windows-gnu
```

# Checklist

- [x]  [isomdl] Integrate `CoseSign1`
- [ ]  [isomdl] Integrate `COSEMac0`
- [ ]  [isomdl] Use coset `CoseKey`
- [ ]  [isomdl] Test building with `macosx` targets
# Description

- Integrate `coset` crate.
- Crate module `cose`
where we have `Cose`
trait with some basic methods and implemented by `CoseSign1`
and `CoseMac0`
which are wrappers over coset analogous.
- Implement `SignatureAlgorithm` trait for `CoseSign1` and `CoseMac0`.

# Ref

https://linear.app/spruceid/issue/SKIT-448/iso-mdl-investigate-coset

# Changes

- Add `CoseSign1` and `CoseMac0` wrappers over coset analogous.
- Add `Cose` trait with some basic methods.
- Implement `SignatureAlgorithm` for `CoseSign1` and `CoseMac0`.
- Add a global map to hold signature payloads
as our flow returns a reference to the payload
and later that is signed externally.
- Serialize/deserialize `CoseSign1` and `CoseMac0`.
- Change signature flow to use the coset signature.
- Use `iana::Algorithm`.

## Other changes

None

# Reviewers, please pay special attention to…

The way `CoseSign1` is used.
Signature flow and global map
that hold signature payload, so we can return reference.

# Tested

Tested locally, running all tests.
Build with these targets:

```
aarch64-linux-android
armv7-linux-androideabi
i686-linux-android
wasm32-unknown-unknown
wasm32-wasi
x86_64-unknown-linux-gnu
i686-unknown-linux-gnu
x86_64-unknown-linux-musl
x86_64-pc-windows-gnu
i686-pc-windows-gnu
```

# Checklist

- [x]  [isomdl] Integrate `CoseSign1`
- [ ]  [isomdl] Integrate `COSEMac0`
- [ ]  [isomdl] Use coset `CoseKey`
- [ ]  [isomdl] Test building with `macosx` targets
# Description

Remove some unneeded implementations,
refactor some code and other small changes.

# Ref

https://linear.app/spruceid/issue/SKIT-448/iso-mdl-investigate-coset

# Changes

- Remove `cbc-mac`.
- Remove `HMAC_384_384` and `HMAC_512_512`.
- Use `set_signature`.
- Have `X5Chain` return `ciborium Value`.

# Tested

Tested locally, running all tests and build on several platforms.

# Checklist

- [x]  [isomdl] Integrate `CoseSign1`
- [ ]  [isomdl] Integrate `COSEMac0`
- [ ]  [isomdl] Use coset `CoseKey`
- [x]  [isomdl] Test building with `macosx` targets
…iborium.

- Add concept of CoseSign1Builder and CoseMac0Builder
- Add signature prepare and verify methods
- Add tests.
Co-authored-by: Jacob <jacob.ward@spruceid.com>
Co-authored-by: Jacob <jacob.ward@spruceid.com>
… (SAAO) as per ISO/IEC JTC 1/SC 17/WG 4 N 4566.
@radumarias radumarias changed the title Implementation of MCD capability descriptor and SA-Attestation Object (SAAO) as per ISO/IEC JTC 1/SC 17/WG 4 N 4566. Implementation of MCD capability descriptor and SA-Attestation Object (SAAO) as per ISO/IEC JTC 1/SC 17/WG 4 N 4566 Aug 5, 2024
# Conflicts:
#	.gitignore
#	src/definitions/traits/to_cbor.rs
#	src/lib.rs
…s already present when creating `PreparedCose*` objects.
…nd-saao-formats

# Conflicts:
#	.gitignore
#	src/definitions/traits/to_cbor.rs
#	src/lib.rs
…port-to-read-the-mcd-and-saao-formats

# Conflicts:
#	src/cose/mac0.rs
#	src/lib.rs
@radumarias radumarias marked this pull request as draft September 1, 2024 22:43
@radumarias radumarias marked this pull request as ready for review September 23, 2024 10:06
@radumarias
Copy link
Contributor Author

Closing this as we opened #97 because of some merge issues from some old code from coset integration

@radumarias radumarias closed this Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant