Remove 1024 bit rsa

This commit is contained in:
Max Goedjen 2025-08-24 14:05:24 -07:00
parent ce52dd2b35
commit 7d6223a327
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ public extension SecretStore {
return .ecdsaSignatureMessageX962SHA256
case (.ecdsa, 384):
return .ecdsaSignatureMessageX962SHA384
case (.rsa, 1024), (.rsa, 2048):
case (.rsa, 2048):
return .rsaSignatureMessagePKCS1v15SHA512
default:
fatalError()

View File

@ -115,7 +115,7 @@ extension OpenSSHKeyWriter {
// [4 byte prefix][2 byte prefix][n][2 byte prefix][e]
// Rather than parse out the whole ASN.1 blob, we know how this should be formatted, so pull values directly.
let keySize = secret.keyType.size
guard secret.keyType.algorithm == .rsa && (keySize == 1024 || keySize == 2048) else { fatalError() }
guard secret.keyType.algorithm == .rsa && keySize == 2048 else { fatalError() }
let length = secret.keyType.size/8
let data = secret.publicKey
let n = Data(data[8..<(9+length)])