Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entropy Apple: change time function called #8357

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

SparkiDev
Copy link
Contributor

Description

Use clock_gettime_nsec_np and get the raw monotonic counter.

Testing

gather and analyse on ARM Mac

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

Use clock_gettime_nsec_np and get the raw monotonic counter.
Copy link
Contributor

@kaleb-himes kaleb-himes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yields slightly higher entropy than previous use of mach_absolute_time! (0.9 bit / 8 bits generated previously ---> 1.2406 bits / 8 bits generated with this change.) Thank you @SparkiDev!

Full Report:

./analyse entropy-data-8bits-raw.dat 
Reading...
Processing Input...
Simple Analysis...
  Bit Stream Shannon Entropy              : 0.981703 7.853621
  8-bit Stream Shannon Entropy            :          2.959458

Analysing...
  Bit Stream Most Common Value Entropy    : 0.786090
  8-bit Stream Most Common Value Entropy  :          1.246894
Could not find p!!!
  Bit Stream Collision Entropy            : 1.000000
  Bit Stream Markov Entropy               : 0.845944
  Bit Stream Compression Entropy          : 0.257405
  Bit Stream t-Tuple Entropy              : 0.155079
  8-bit Stream t-Tuple Entropy            :          1.032288
  Bit Stream LRS Entropy                  : 0.211366
  8-bit Stream LRS Entropy                :          1.530848
  Bit Stream Multi MCW Entropy            : 0.786253
  8-bit Stream Multi MCW Entropy          :          1.248599
  Bit Stream Lag Prediction Entropy       : 0.231140
  8-bit Stream Lag Prediction Entropy     :          1.736904
  Bit Stream Multi MMC Entropy            : 0.168477
  8-bit Stream Multi MMC Entropy          :          1.246579
  Bit Stream LZ78Y Entropy                : 0.786100
  8-bit Stream LZ78Y Entropy              :          1.253661
                                            -----------------
              Minimum 8-bit Stream Entropy:          1.032288
                Minimum Bit Stream Entropy: 0.155079 1.240631
                  Assessed Minimum Entropy:          1.032288
                                            -----------------

@dgarske dgarske merged commit 9819833 into wolfSSL:master Jan 20, 2025
152 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants