Skip to content

Commit d6bf0c5

Browse files
Only read 32 bytes from /dev/urandom for a seed.
Check out the orlp/ed25519 repo's PR orlp#15 for more details: orlp#15
1 parent fafd567 commit d6bf0c5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/seed.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ int ed25519_create_seed(unsigned char *seed) {
3030
return 1;
3131
}
3232

33+
setbuf(f, NULL);
3334
fread(seed, 1, 32, f);
3435
fclose(f);
3536
#endif

0 commit comments

Comments
 (0)