Skip to content
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

Potential side-channels during en-/decoding of private-key #56

Open
blochberger opened this issue Oct 22, 2019 · 0 comments
Open

Potential side-channels during en-/decoding of private-key #56

blochberger opened this issue Oct 22, 2019 · 0 comments

Comments

@blochberger
Copy link

There are multiple places where an RSA private-key is encoded or decoded with Base64 using standard Swift library functions. Since these functions do not guarantee constant-time processing of the input, there is a potential side-channel that may leak information about the private-key.

I did not investigate the code thoroughly, but here are the potentially insecure uses I found at first glance:

https://github.com/IBM-Swift/BlueRSA/blob/9435e102af2838aa29c1f52a843ee1886876c379/Sources/CryptorRSA/CryptorRSAKey.swift#L392

https://github.com/IBM-Swift/BlueRSA/blob/9435e102af2838aa29c1f52a843ee1886876c379/Sources/CryptorRSA/CryptorRSAKey.swift#L631

https://github.com/IBM-Swift/BlueRSA/blob/9435e102af2838aa29c1f52a843ee1886876c379/Sources/CryptorRSA/CryptorRSAKey.swift#L676

https://github.com/IBM-Swift/BlueRSA/blob/9435e102af2838aa29c1f52a843ee1886876c379/Sources/CryptorRSA/CryptorRSAKey.swift#L739

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants