Skip to content

feat(Internal): add constant-time Eq, use Scoped for internals#169

Merged
Kleidukos merged 2 commits intohaskell-cryptography:mainfrom
jhenahan:feat/constant-time-eq
Jan 3, 2025
Merged

feat(Internal): add constant-time Eq, use Scoped for internals#169
Kleidukos merged 2 commits intohaskell-cryptography:mainfrom
jhenahan:feat/constant-time-eq

Conversation

@jhenahan
Copy link
Copy Markdown
Contributor

@jhenahan jhenahan commented Jan 3, 2025

Constant-time comparison helps avoid timing attacks on secret cryptographic material.

Also adds functions for interacting with sodium_malloc'd pointers.

Stack

@jhenahan jhenahan requested a review from Kleidukos January 3, 2025 15:35
@jhenahan jhenahan force-pushed the feat/constant-time-eq branch 2 times, most recently from 387ce13 to f3a7b2f Compare January 3, 2025 15:53
-- too short.
--
-- @since 0.0.3.0
unsafeCopyToSodiumPointer :: CSize -> StrictByteString -> IO (ForeignPtr CUChar)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jhenahan jhenahan force-pushed the feat/constant-time-eq branch 2 times, most recently from e1d2031 to 196a346 Compare January 3, 2025 16:34
Constant-time comparison helps avoid timing attacks on secret
cryptographic material.

Also adds functions for interacting with `sodium_malloc`'d pointers.
@jhenahan jhenahan force-pushed the feat/constant-time-eq branch from 196a346 to 83f92ed Compare January 3, 2025 18:21
The previous commit handles `IO` in the instance definitions, so it's
no longer necessary to handle it at the use sites.
@jhenahan jhenahan force-pushed the feat/constant-time-eq branch from 83f92ed to 18a79fd Compare January 3, 2025 18:26
@jhenahan jhenahan requested a review from Kleidukos January 3, 2025 18:35
@Kleidukos Kleidukos merged commit 2a8e08f into haskell-cryptography:main Jan 3, 2025
@Kleidukos
Copy link
Copy Markdown
Member

Cheers

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.

2 participants