diff --git a/Sources/Packages/Localizable.xcstrings b/Sources/Packages/Localizable.xcstrings index 53e3397..357949a 100644 --- a/Sources/Packages/Localizable.xcstrings +++ b/Sources/Packages/Localizable.xcstrings @@ -6311,9 +6311,6 @@ } } } - }, - "Warning: ML-DSA keys are very new, and not supported by many servers yet. Please verify the server you'll be using this key for accepts ML-DSA keys." : { - } }, "version" : "1.0" diff --git a/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHPublicKeyWriter.swift b/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHPublicKeyWriter.swift index 0a9465c..25016a8 100644 --- a/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHPublicKeyWriter.swift +++ b/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHPublicKeyWriter.swift @@ -17,10 +17,6 @@ public struct OpenSSHPublicKeyWriter: Sendable { openSSHIdentifier(for: secret.keyType).lengthAndData + ("nistp" + String(describing: secret.keyType.size)).lengthAndData + secret.publicKey.lengthAndData - case .mldsa: - // https://www.ietf.org/archive/id/draft-sfluhrer-ssh-mldsa-04.txt - openSSHIdentifier(for: secret.keyType).lengthAndData + - secret.publicKey.lengthAndData case .rsa: // https://datatracker.ietf.org/doc/html/rfc4253#section-6.6 openSSHIdentifier(for: secret.keyType).lengthAndData + @@ -78,8 +74,6 @@ extension OpenSSHPublicKeyWriter { switch (keyType.algorithm, keyType.size) { case (.ecdsa, 256), (.ecdsa, 384): "ecdsa-sha2-nistp" + String(describing: keyType.size) - case (.mldsa, 65), (.mldsa, 87): - "ssh-mldsa-" + String(describing: keyType.size) case (.rsa, _): "ssh-rsa" default: diff --git a/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHReader.swift b/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHReader.swift index 6b7bc08..e3ef8aa 100644 --- a/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHReader.swift +++ b/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHReader.swift @@ -17,9 +17,7 @@ public final class OpenSSHReader { let lengthRange = 0..<(UInt32.bitWidth/8) let lengthChunk = remaining[lengthRange] remaining.removeSubrange(lengthRange) - let littleEndianLength = lengthChunk.withUnsafeBytes { pointer in - return pointer.load(as: UInt32.self) - } + let littleEndianLength = lengthChunk.bytes.unsafeLoad(as: UInt32.self) let length = Int(littleEndianLength.bigEndian) let dataRange = 0..: View { .font(.caption) } } - if keyType?.algorithm == .mldsa { - Text("Warning: ML-DSA keys are very new, and not supported by many servers yet. Please verify the server you'll be using this key for accepts ML-DSA keys.") - .padding(.horizontal, 10) - .padding(.vertical, 3) - .background(.red.opacity(0.5), in: RoundedRectangle(cornerRadius: 5)) - } } VStack(alignment: .leading) { TextField("Key Attribution", text: $keyAttribution, prompt: Text("test@example.com"))