Skip to content

Commit 8dea0d2

Browse files
authored
Merge pull request #378 from pq-code-package/cbmc-issue-crypto_sign_open_s_eq_sm
CBMC: Allow `m == sm` aliasing for crypto_sign_open
2 parents 32c6629 + ea0cf4b commit 8dea0d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mldsa/sign.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ int crypto_sign_open(uint8_t *m, size_t *mlen, const uint8_t *sm, size_t smlen,
305305
__contract__(
306306
requires(memory_no_alias(m, smlen))
307307
requires(memory_no_alias(mlen, sizeof(size_t)))
308-
requires(memory_no_alias(sm, smlen))
308+
requires(m == sm || memory_no_alias(sm, smlen))
309309
requires(memory_no_alias(ctx, ctxlen))
310310
requires(memory_no_alias(pk, CRYPTO_PUBLICKEYBYTES))
311311
assigns(memory_slice(m, smlen))

0 commit comments

Comments
 (0)