-
Notifications
You must be signed in to change notification settings - Fork 489
Closed as not planned
Labels
Description
Prerequisites
- Checked the developer manual
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=repo%3Alibtom%2Flibtomcrypt
- Checked that your issue isn't due to the fact that you're using asymmetric cryptography and you forgot linking in and/or setting an MPI provider (usually this causes either random crashes or runtime errors like
LTC_ARGCHK 'ltc_mp.name != NULL' failure ...). c.f. Ch. "Math Descriptors" of the developer manual. - Checked that your issue isn't related to TomsFastMath's limitation that PK operations can by default only be done with max. 2048bit keys
Description
s_rng_ansic expects the clock to advance on its own, causing an infinite loop on cooperatively-scheduled systems where the clock only advances when yielding the thread.
#0 0x001e9fe8 in clock ()
#1 0x0015eb60 in s_rng_ansic (buf=0x8007b20 ".1:53431)", len=63, callback=0x0) at libtomcrypt/src/prngs/rng_get_bytes.c:69
#2 0x0015ec8c in rng_get_bytes (out=0x8007b20 ".1:53431)", outlen=64, callback=0x0) at libtomcrypt/src/prngs/rng_get_bytes.c:163
Steps to Reproduce
One public system that causes this issue I was able to find is the Nintendo 3DS, using dev kit pro.
- Download devkitpro
- Create a project with it targeting Nintendo 3DS
- Call rng_get_bytes
Alternatively:
- Override
clock()to always return the same value - Call rng_get_bytes
Version
v1.18.2-1013-g9a13375d
Reactions are currently unavailable