Ticket #64 (closed feature: fixed)

Opened 6 years ago

Last modified 3 years ago

Parrot needs a source of entropy

Reported by: cotto Owned by: dukeleto
Priority: normal Milestone:
Component: core Version:
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

Parrot needs a way to get entropy from the underlying system. runtime/parrot/library/uuid.pir the string hash seed init code need it. There is currently some prng functionality in src/util.c, but it's only as unpredictable as the seed data. It'd also be good for this entropy to be accessible via PIR, either by having the interp grab some seed entropy for the prng at initialization or directly, through a new opcode.

Change History

Changed 5 years ago by dukeleto

  • owner set to dukeleto
  • status changed from new to assigned

Changed 3 years ago by cotto

I've added Parrot_platform_get_entropy(), which return a random INTVAL, with implementations for generic and win32 in the  get-entropy branch. The generic implementation will work on any platform that has /dev/urandom. The branch uses Parrot_platform_get_entropy() to initialize Parrot's prng and hash seed, so if the branch builds it's probably fine on your platform.

I'll give the branch some windows testing tomorrow. In the meantime, comments are welcome.

Changed 3 years ago by cotto

After some help from whiteknight++, the branch seems to build fine on the msvc toolchain. The build also looks good on mingw up until it crashes while building opsc. The same thing happens in master, so it looks like I'm not introducing any new breakage with the branch. I still plan on adding better error checking, but the branch is starting to look pretty good at this point.

Changed 3 years ago by jkeenan

Since I can no longer find this branch on github, I assume it was merged into master and then deleted.

If so, can this ticket be closed?

Thank you very much..

kid51

Changed 3 years ago by cotto

  • status changed from assigned to closed
  • resolution set to fixed

Yes. I thought I'd already closed it, but I guess that was a dream or something. Closing for real.

Note: See TracTickets for help on using tickets.