From aa4d426b4d3527d7e166df1a05058c9a4a0f6683 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 30 Apr 2021 00:33:56 +0200 Subject: initial/final commit --- .../doc/crypto/OPENSSL_instrument_bus.pod | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 openssl-1.1.0h/doc/crypto/OPENSSL_instrument_bus.pod (limited to 'openssl-1.1.0h/doc/crypto/OPENSSL_instrument_bus.pod') diff --git a/openssl-1.1.0h/doc/crypto/OPENSSL_instrument_bus.pod b/openssl-1.1.0h/doc/crypto/OPENSSL_instrument_bus.pod new file mode 100644 index 0000000..1407261 --- /dev/null +++ b/openssl-1.1.0h/doc/crypto/OPENSSL_instrument_bus.pod @@ -0,0 +1,53 @@ +=pod + +=head1 NAME + +OPENSSL_instrument_bus, OPENSSL_instrument_bus2 - instrument references to memory bus + +=head1 SYNOPSIS + + #ifdef OPENSSL_CPUID_OBJ + size_t OPENSSL_instrument_bus(int *vector, size_t num); + size_t OPENSSL_instrument_bus2(int *vector, size_t num, size_t max); + #endif + +=head1 DESCRIPTION + +It was empirically found that timings of references to primary memory +are subject to irregular, apparently non-deterministic variations. The +subroutines in question instrument these references for purposes of +gathering entropy for random number generator. In order to make it +bus-bound a 'flush cache line' instruction is used between probes. In +addition probes are added to B elements in atomic or +interlocked manner, which should contribute additional noise on +multi-processor systems. This also means that B should be +zeroed upon invocation (if you want to retrieve actual probe values). + +OPENSSL_instrument_bus() performs B probes and records the number of +oscillator cycles every probe took. + +OPENSSL_instrument_bus2() on the other hand B consecutive +probes with the same value, i.e. in a way it records duration of +periods when probe values appeared deterministic. The subroutine +performs at most B probes in attempt to fill the B, +with B value of 0 meaning "as many as it takes." + +=head1 RETURN VALUE + +Return value of 0 indicates that CPU is not capable of performing the +benchmark, either because oscillator counter or 'flush cache line' is +not available on current platform. For reference, on x86 'flush cache +line' was introduced with the SSE2 extensions. + +Otherwise number of recorded values is returned. + +=head1 COPYRIGHT + +Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. + +=cut -- cgit v1.2.3