You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,7 +172,7 @@ if case let .persistentReference(data) = try keychain.store(
172
172
173
173
#### CryptoKit
174
174
175
-
`SwiftSecurity` lets you natively store `CryptoKit` keys as native `SecKey` instances. [Keys supporting such conversion](https://developer.apple.com/documentation/cryptokit/storing_cryptokit_keys_in_the_keychain), like `P256`/`P384`/`P521`, conform to `SecKeyConvertible` protocol.
175
+
`SwiftSecurity` lets you natively store `CryptoKit` keys as native `SecKey` instances. [Keys supporting such conversion](https://developer.apple.com/documentation/cryptokit/storing_cryptokit_keys_in_the_keychain#3369556), like `P256`/`P384`/`P521`, conform to `SecKeyConvertible` protocol.
176
176
177
177
```swift
178
178
// Store private key
@@ -190,7 +190,7 @@ try keychain.store(
190
190
)
191
191
```
192
192
193
-
Other key types from `CryptoKit`, like `SymmetricKey`, `Curve25519`, `SecureEnclave.P256`, have no direct keychain corollary. In particular, `SecureEnclave.P256` is a persistent reference to the key inside `Secure Enclave`, not the key itself. These keys conform to `SecDataConvertible`, so store them as follows:
193
+
Other key types, like `SymmetricKey`, `Curve25519`, `SecureEnclave.P256`, have no direct keychain corollary. In particular, `SecureEnclave.P256` is a reference to the key inside `Secure Enclave`, not the key itself. These types conform to `SecDataConvertible`, so store them as follows:
> `SecKey` is intended for asymmetric key storage. Only `ECPrimeRandom` (`CryptoKit -> P256/384/512`) and `RSA` algorithms are supported. See[On Cryptographic Key Formats](https://developer.apple.com/forums/thread/680554) for more info.
202
+
> `SecKey` is intended for asymmetric key storage, supporting only `ECSECPrimeRandom` (`CryptoKit -> P256/384/512`) and `RSA` algorithms. For details, see[On Cryptographic Key Formats](https://developer.apple.com/forums/thread/680554).
If your project uses [apple/swift-certificates](https://github.com/apple/swift-certificates) package, the `Certificate` will offer more functionality. In case of `Swift Package Manager` dependency resolve issues, copy `SecCertificateConvertible` conformance directly to your project.
217
+
You could use `SwiftSecurity` simultaneously with `X509` package from [apple/swift-certificates](https://github.com/apple/swift-certificates). In case of `Swift Package Manager` dependency resolve issues, copy `SecCertificateConvertible` conformance directly to your project.
218
218
219
219
#### Digital Identity
220
220
@@ -399,7 +399,7 @@ To add support for custom types, you can extend them by conforming to the follow
399
399
// Store as Data (GenericPassword, InternetPassword)
400
400
extensionCustomType: SecDataConvertible {}
401
401
402
-
// Store as Key (ANSI x9.63, Elliptic Curves)
402
+
// Store as Key (ANSI x9.63 Elliptic Curves or RSA Keys)
0 commit comments