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

KTOR-3656 Use secure random for nonce generation #2776

Merged
merged 4 commits into from
Mar 10, 2022
Merged

Conversation

rsinukov
Copy link
Contributor

No description provided.

@rsinukov rsinukov requested a review from e5l January 17, 2022 13:53
@rsinukov rsinukov self-assigned this Jan 17, 2022
Copy link
Member

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rsinukov rsinukov marked this pull request as draft January 24, 2022 00:42
@rsinukov
Copy link
Contributor Author

Hi @danwallach
Thanks for your comments. This PR is still in draft and I opened it just for checking that it works on different platform and OS. I'll address your comments before merging.

@lolilofit lolilofit marked this pull request as ready for review March 3, 2022 07:23
@lolilofit lolilofit requested a review from e5l March 3, 2022 09:08
Copy link
Member

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -8,7 +8,7 @@ import kotlinx.coroutines.*
import org.khronos.webgl.*
import kotlin.js.*

private const val NONCE_SIZE_IN_BYTES = 8
private const val NONCE_SIZE_IN_BYTES = 16
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please extract to common internal constant

@lolilofit lolilofit merged commit 67a3640 into main Mar 10, 2022
@lolilofit lolilofit deleted the rsinukov/secure-nonce branch March 10, 2022 11:15
@danwallach
Copy link

Feature request: expose the secureRandom method (currently internal expect fun secureRandom(bytes: ByteArray)) as a public part of the API. This would make it useful for applications, like mine, that need a portable way to get secure random bytes, for their own cryptographic needs.

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

Successfully merging this pull request may close these issues.

4 participants