Skip to content

Commit

Permalink
remove iOS legacy attestation
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Oct 4, 2024
1 parent ac05c6c commit a5c9f9f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
2 changes: 0 additions & 2 deletions docs/docs/indispensable.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ It contains essentials such as:
* `X509SignatureAlgorithm` enumeration of supported X.509 signature algorithms (maps to and from `SignatureAlgorithm`)
* `Attestation` representing a container to convey attestation statements
* `AndroidKeystoreAttestation` contains the certificate chain from Google's root certificate down to the attested key
* `IosLegacyHomebrewAttesation` contains an attestation and an assertion, conforming to the emulated key attestation scheme
currently supported by warden.
* `IosHomebrewAttestation` contains the new iOS attestation format introduces in Supreme 0.2.0 (see the [Attestation](supreme.md#attestation) section of the _Supreme_ manual for details).
* `SelfAttestation` is used on the JVM. It has no specific semantics, but could be used, if an attestation-supporting HSM is used on the JVM. WIP!

Expand Down
6 changes: 0 additions & 6 deletions docs/docs/supreme.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,6 @@ The Supreme KMP crypto provider introduces a `digest()` extension function on th
For a list of supported algorithms, check out the [feature matrix](features.md#supported-algorithms).

## Attestation
!!! info
All attestation types are serializable for transfer and are part of the _Indispensable_ module, so they are usable
on JVM-only back-ends, that may not wish to include the _Supreme_ KM crypto provider.
[_WARDEN_](https://github.com/a-sit-plus/warden) does not yet directly support this format, but will in the next release.
As of now, the encoded certificate chain of the `AndroidKeytoreAttestation` and an array containing `attestation`
followed by `assertion` from the `IosLegacyHomebrewAttestation` are supported WARDEN.

The Android KeyStore offers key attestation certificates for hardware-backed keys.
These certificates are exposed by the signer's `.attestation` property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,6 @@ data class AndroidKeystoreAttestation (
@SerialName("x5c")
val certificateChain: CertificateChain) : Attestation

@Serializable
@SerialName("ios-appattest-assertion")
data class IosLegacyHomebrewAttestation(
@Serializable(with=ByteArrayBase64UrlSerializer::class)
val attestation: ByteArray,
@Serializable(with=ByteArrayBase64UrlSerializer::class)
val clientData: ByteArray,
@Serializable(with=ByteArrayBase64UrlSerializer::class)
val assertion: ByteArray): Attestation {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is IosLegacyHomebrewAttestation) return false

if (!clientData.contentEquals(other.clientData)) return false
if (!attestation.contentEquals(other.attestation)) return false
return assertion.contentEquals(other.assertion)
}

override fun hashCode(): Int {
var result = attestation.contentHashCode()
result = 31 * result + assertion.contentHashCode()
result = 31 * result + clientData.contentHashCode()
return result
}
}

val StrictJson = Json { ignoreUnknownKeys = true; isLenient = false }

@Serializable
Expand Down

0 comments on commit a5c9f9f

Please sign in to comment.