-
Notifications
You must be signed in to change notification settings - Fork 123
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
CC.RSA.sign output cannot be verified openssl backed libraries #59
Comments
Hi @mikehouse , We seem to be having the same issue since we've updated our codebase to work with XCode 11. I've written some tests in XCode 10.1 with salt disabled (lengt = 0) and they return a different result in XCode 11. Until this moment, we're still looking for a solution. I am not sure if you have found any and/or able to share? |
Small update here from my side. |
@brentvvosselen I am receiving the same verification failure as @mikehouse under the exact same scenario. Also not a cryptographer--at all--but is it related to the set salt value applied on the iOS side? SwCrypt public enum AsymmetricSAPadding: UInt32 {
case pkcs15 = 1001
case pss = 1002
} Also thanks for making this and looking into it! public_key.verify(signature_decoded, input_string.encode('utf-8'), padding.PSS( mgf=padding.MGF1(hashes.SHA256()), salt_length=16,), hashes.SHA256() ) let signature = (try? CC.RSA.sign(Data(inputString.utf8), derKey: privateKey, padding: .pss, digest: .sha256, saltLen: 16))! returns |
I am building against Swift 5 and PR (#51) has been merged. However I am still having the same issue-- |
Hello, awesome work, thanks a lot!
Have found strange behaviour, I'm not a cryptographer and don't know where to dig to. A signature created with .pss padding and some salt false verified on backend with Python/Ruby but works vice verse.
iOS:
Backend Python returns
false
for this signatureThe same verification tried on Ruby
also gives
false
result.But when create
signature
on backend sidePython
Ruby
Then on iOS side
It returns
true
.Am I missing something ? Or CommonCrypto and OpenSSL work different for signature creation when using pss + salt ? As using padding
pkcs15
all works as expected.Thank you one more time for your great work !
The text was updated successfully, but these errors were encountered: