Skip to content

Commit

Permalink
Only read 32 bytes from /dev/urandom for a seed.
Browse files Browse the repository at this point in the history
Check out the orlp/ed25519 repo's PR orlp#15 for more details: orlp#15
  • Loading branch information
GlitchedPolygons committed Oct 9, 2020
1 parent fafd567 commit d6bf0c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/seed.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ int ed25519_create_seed(unsigned char *seed) {
return 1;
}

setbuf(f, NULL);
fread(seed, 1, 32, f);
fclose(f);
#endif
Expand Down

0 comments on commit d6bf0c5

Please sign in to comment.