Usage v6.0.2

Quantum Origin provides a C SDK which enables users to integrate Quantum Origin directly into their own applications.

Overview

The process of integrating Quantum Origin into your application using the C SDK is summarized as follows:

  1. Installation:

Please see Installation section.

  1. Build system:

    Configure your build system such that your compiler can locate the subdirectory containing the Quantum Origin SDK header files, and your linker can find the Quantum Origin SDK library/libraries, static or dynamic as required. A short script named envars.bat (Windows) or envvars.sh (Linux) is created by the installer and placed in the sample_code folder(s) to assist with setting of build-time and run-time environment variables.

  2. Declaration:

    In your code, include the header file: quantum_origin/quantum_origin_sdk_c.h:

    #include <quantum_origin/quantum_origin_sdk_c.h>
    
  1. Configuration Options:

    Each instance of Quantum Origin SDK requires various configuration parameters depending on the specific application and environment.

    The SDK supports two approaches:

    1. SetOptions: The runtime parameters are supplied programmatically by the application using calls to the various qosdk_setopt_xxx functions and the relevant optionIDs.

    2. ConfigFile: The runtime parameters are supplied in a YAML configuration file stored on disk.

    In either case, the configuration items themselves are similar. Please refer to the Configuration section for information on each of the configuration options.

  2. Logging:

    Quantum Origin SDK includes a logging sub-system which allows an application to process or emit API log entries to a data store of choice. However, at this time, this does not affect the emitting or destination of log entries emitted from the underlying generator threads.

    The logging sub-system is optional and can be configured to log to a file, syslog, etc.. The logging level can also be set to control the verbosity of the log entries. These options can be set programmatically or via a configuration file. Quantum Origin SDK also supported installation of a custom logging callback function which can be used to have more control over how log entries are processed, or even integrated to an existing logging sub-system.

    Please see the Logging Configuration section for details.

  1. Configuration and Instantiation:

    1. SetOptions Approach:

      1. Configuration:

      An Options structure needs to be created (qosdk_setopt_init) and populated (qosdk_setopt_int, qosdk_setopt_str, qosdk_setopt_bytes) with the appropriate OptionID (tQOSDK_OPTID) and value.

      Each option is set using the appropriate setopt_xxx call, depending on the _type_ of the associated value.

      For example: setting the size of the internal cache requires a numeric value, so is set with a call of the form

      erc = qosdk_setopt_int(pConfigCtx, QOSDK_OPT_CACHE_SIZE, 256);
      

      Calling sequence (pseudo code)…

      ...
      qosdk_setopt_init();
      qosdk_setopt_int  (..., QOSDK_OPT_XXX, nValue );
      qosdk_setopt_str  (..., QOSDK_OPT_YYY, szValue );
      qosdk_setopt_bytes(..., QOSDK_OPT_ZZZ, pvalue, cbValue );
      ...
      
      qosdk_init_from_config_struct();
      qosdk_setopt_cleanup();
      ...
      
      1. Instantiation:

      Construct and configure a Quantum Origin SDK object using a call to qosdk_init_from_config_struct().

      The return value/context is passed as the 1st parameter to subsequent SDK calls, most notably, the generation of randomness.

      Once the Quantum Origin SDK object is successfully created, the Options structure should be released with a call to qosdk_setopt_cleanup().

      The context pointer will now be invalid and should be zeroised.

      See the Sample Code in the 6.1 SetOptions Approach section.

    2. ConfigFile Approach:

      1. Configuration:

      Create a YAML file containing the required settings and parameters. Construct and configure a Quantum Origin SDK object using qosdk_init_from_config_file().

      1. Instantiation:

      Construct and configure a Quantum Origin SDK object using qosdk_init_from_config_file(). The return value/context will be used in most calls to the SDK, including the generation of randomness.

      See the Sample Code in the 6.2 ConfigFile Approach section.

  2. Generation of randomness:

    When randomness is needed, simply call the qosdk_get_randomness() function.

    For example, to generate 32 bytes of randomness, the call would be:

    tQOSDK_RESULT erc;
    unsigned char resultBuffer[32];
    size_t bytesRequested = sizeof(resultBuffer);
    size_t bytesSupplied = 0;
    
    // Get randomness
    erc = qosdk_get_randomness(pQuantumOrigin, resultBuffer, bytesRequested, &bytesSupplied);
    

    where pQuantumOrigin is a Quantum Origin instance i.e. the context pointer returned from the qosdk_init_from_config_struct() or qosdk_init_from_config_file() calls.

    This function will fill the provided buffer with the requested number of bytes, and return tQO_ERRCODE_SUCCESS if successful, otherwise an error code indicating the cause of the failure.

    This may be called any number of times using the single Quantum Origin instance/context.

  3. Destruction and Cleanup:

    When the Quantum Origin SDK object is no longer required, the application must call qosdk_destroy in order to free up resources used at construction time and at runtime.

    The instance pointer will now be invalid and should be zeroised.


Error Handling

When integrating with the Quantum Origin C SDK, callers should treat errors as potential problems and implement defensive error handling. The SDK propagates errors up to the surface through the use of return codes and textual error identifiers (see below).


Key guidance:

  • Many of the functions in the Quantum Origin C SDK return a numeric return value indicating whether the function was successful or if an error occurred.

  • The application should check the return value of each function call and handle any errors appropriately. Thus,applications can implement robust error handling and recovery strategies.

  • There are some functions that don’t follow this pattern however, in all cases, a call to API function qosdk_get_error_code() will return the most recent error code.Furthermore, a call to qosdk_get_error_description() will return a pointer to the description of this most recent error code.

  • When a local randomness source is unavailable or degraded, prefer a safe failure mode unless your operational policy explicitly allows a fallback to an alternative source. If a fallback is used, ensure it is documented and monitored.

  • Where possible, inputs passed into the SDK (buffer sizes, expected formats, etc) should be validated. Invalid inputs should be rejected by the caller rather than relying on undefined behaviour from the SDK.

  • Log context around errors without recording secrets (do not log seeds, private keys, or other sensitive material). Include timestamps, operation names, and error identifiers to aid debugging.

Below is a consolidated list of error strings and guidance on where each error originates.


SDK Error Codes and Associated Descriptions:

The SDK may report problems originating from several internal subsystems. Below is a list of each error code, the canonical textual error description as returned from qosdk_get_error_description(), and any relevant comments or notes which may help understand or solve the issue or problem.


Error Code: ERC_QOSDK_OK

Category:

All

Description:

Operation completed successfully

Comments:

A return value of zero means the operation was successful.


Error Code: ERC_QOSDK_EPARAM_CONFIG_FILENAME_NOT_SUPPLIED

Category:

Configuration

Description:

A required configuration filename parameter was not supplied

Comments:

The function requires the path and filename of a YAML configuration file, but one was not supplied.


Error Code: ERC_QOSDK_EPARAM_NODE_PATH_NOT_SUPPLIED

Category:

Configuration

Description:

The required node-path parameter was not supplied

Comments:

Configuration files support optional hierarchical nodes. The node-path parameter must be either a valid, existing node-path, or an empty string. A NULL value is not supported.


Error Code: ERC_QOSDK_EPARAM_CONFIG_PTR_NOT_SUPPLIED

Category:

Configuration

Description:

The required configuration pointer parameter was not supplied

Comments:

The function requires a non-NULL pointer (e.g. A valid pQuantumOriginConfig as returned from qosdk_setopt_init() )


Error Code: ERC_QOSDK_EPARAM_QOSDK_CONTEXT_NOT_SUPPLIED

Category:

Configuration

Description:

The required context pointer parameter was not supplied

Comments:

The function requires a non-NULL pointer to a Quantum Origin instance, typically pQuantumOrigin as returned from qosdk_init_from_config_file() or qosdk_init_from_config_struct()


Error Code: ERC_QOSDK_EPARAM_DEST_BUFFER_NOT_SUPPLIED

Category:

Configuration

Description:

The required destination buffer output parameter was not supplied

Comments:

The function, typically qosdk_get_randomness(), requires, as an output parameter, a valid, pre-allocated buffer of sufficient size in which to place the requested randomness.


Error Code: ERC_QOSDK_EPARAM_BYTES_RETURNED_PTR_NOT_SUPPLIED

Category:

Configuration

Description:

The required byte-count output parameter was not supplied

Comments:

The function, typically qosdk_get_randomness(), requires, as an output parameter, a pointer to a size_t variable in which the number of bytes actually generated is written. This may be less than the number of bytes requested.


Error Code: ERC_QOSDK_EPARAM_VALUE_PTR_NOT_SUPPLIED

Category:

Configuration

Description:

The required config value parameter was not supplied

Comments:

The function, typically qosdk_setopt_bytes() or qosdk_setopt_str(), requires a parameter which is a valid pointer to the value to be configured.


Error Code: ERC_QOSDK_FAILED_TO_ASSIGN_SEED_SIGNATURE

Category:

Configuration

Description:

Setting the seed signature failed

Comments:

The function qosdk_setopt_bytes(…, QOSDK_OPT_SEED_SIGNATURE, …) failed to assign the seed signature as requested. Check that the signature is valid and of the correct size.


Error Code: ERC_QOSDK_FAILED_TO_ASSIGN_SEED_CONTENT

Category:

Configuration

Description:

Setting the seed content failed

Comments:

The function qosdk_setopt_bytes(…, QOSDK_OPT_SEED_CONTENT, …) failed to assign the seed as requested. Check that the seed is valid and of the correct size.


Error Code: ERC_QOSDK_UNSUPPORTED_OPTION

Category:

Configuration

Description:

The attempted action is not supported

Comments:

One of the qosdk_setopt_xxx() functions has been called with an option which either invalid or not of the correct type for the function in question. e.g. Attempting to call qosdk_setopt_int() to set QOSDK_OPT_LOGGING_FILENAME, which is a string. In this example, the QOSDK_OPT_LOGGING_FILENAME option is supported only by qosdk_setopt_str(). Please refer to the tQOSDK_OPTID section in quantum_origin_sdk_c.h for supported values.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX01)

Category:

Configuration

Description:

<SpecifiedValue> invalid. Valid values are: <ValidValues>

Comments:

The specified configuration value (<SpecifiedValue>) is not correct or not supported. The list of <ValidValues> is appended to the error message.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX02)

Category:

Configuration

Description:

No <ExpectedParameter> provided in <Category>

Comments:

A required configuration parameter (<ExpectedParameter>) in category <Category> has not been supplied.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX03)

Category:

Configuration

Description:

Path must be specified if WSR type is FILE

Comments:

A device/file name must be specified in order to use a file-type WSR.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX04)

Category:

Configuration

Description:

Seed content is same byte

Comments:

The content of the seed is just a repetition of the same byte. This is most commonly caused by the the use of a dummy, all-zeroes seed present in some code samples. Please check the seed value in your QO config and/or license header file.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX05)

Category:

Configuration

Description:

Evaluation randomness file mode requires filename

Comments:

The system is configured to run in evaluation mode, but no randomness filename has been supplied. This applies only to evaluation systems.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX06)

Category:

Configuration

Description:

Cache parameters, size, refill_at and prefill must be given value if caching is requested

Comments:

In order to enable caching, these additional parameters must be furnished.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX07)

Category:

Configuration

Description:

File-based logging used, but path not specified

Comments:

A log filename must be specified in order to use file-based logging.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX08)

Category:

Configuration

Description:

Fail to parse config file: <PathToFile>

Comments:

The specified config file is either invalid or has the incorrect file format or has errors, so cannot be parsed.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX09)

Category:

Configuration

Description:

Fail to load config string: <ConfigurationString>

Comments:

The specified entry is not recognised as a valid YAML string.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX10)

Category:

Configuration

Description:

No logging provided in config

Comments:

Logging has not been configured, or not configured correctly.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX11)

Category:

Configuration

Description:

Invalid or missing license in config file

Comments:

The specified config file does not contain a valid license.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX12)

Category:

Configuration

Description:

Syslog logging mode is not supported on Windows

Comments:

Syslog is not supported on Windows. Please select a different logging approach.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX13)

Category:

Configuration

Description:

Logging mode not currently supported

Comments:

The requested logging mode is not (yet) available on this platform.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX14)

Category:

Configuration

Description:

RDSEED not supported by CPU

Comments:

RDSEED is not implemented on this processor/platform.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX15)

Category:

Configuration

Description:

File-based WSR specified, but no path provided

Comments:

A device/file name must be specified in order to use a file-type WSR.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX16)

Category:

Configuration

Description:

Callback-based WSR specified, but no callback function provided

Comments:

A pointer to user-authored callback function is required. The callback function must conform to the C calling convention.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX17)

Category:

Configuration

Description:

Jitter-based WSR specified, but no library path provided

Comments:

In order to use Jitter as the WSR, a Jitter library similar to that of the smuellerDD implementation on github must be provided (https://github.com/smuellerDD/jitterentropy-library)


Error Code: ERC_QOSDK_STD_EXCEPTION(EX18)

Category:

Configuration

Description:

Evaluation randomness file ‘<PathToFile>’ does not exist

Comments:

The system is configured to run in evaluation mode, but the specified randomness filename <PathToFile> is not available. This applies only to evaluation systems.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX19)

Category:

Configuration

Description:

A node along the given path was not found in config

Comments:

Configuration files support optional hierarchical nodes. The node-path parameter has been supplied, but no such path can be found in the supplied config file.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX20)

Category:

Configuration

Description:

Running in evaluation mode but without any database

Comments:

The system is configured to run in evaluation mode, but no randomness filename has been supplied. This applies only to evaluation systems.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX21)

Category:

Logging

Description:

Logging failed to start

Comments:

QO was unable to start the required logging thread(s). Possibly out of system resources.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX22)

Category:

Logging

Description:

Failed to register/unregister logging callback function

Comments:

QO was unable to install the specified logging callback function. For example, there are no more available logging sinks (slots).


Error Code: ERC_QOSDK_STD_EXCEPTION(EX23)

Category:

Licensing

Description:

Unexpected mode

Comments:

The supplied license contains an unexpected mode setting. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX24)

Category:

Licensing

Description:

License failed to validate, mode variable does not match config mode

Comments:

The supplied license is failing authentication and/or integrity. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX25)

Category:

Licensing

Description:

License validated but contains no seed, and no derivative seed was supplied in config

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX26)

Category:

Licensing

Description:

Config contains derivative seed but license does not contain any seed signing key hashes

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX27)

Category:

Licensing

Description:

Config contains derivative seed but no signing public key

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX28)

Category:

Licensing

Description:

Seed signing key with hash matching ‘<HashValue>’ not present in license

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX29)

Category:

Licensing

Description:

Could not verify derivative seed signature: <Signature>

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX30)

Category:

Licensing

Description:

No license present

Comments:

A license is required in order to use Quantum Origin. Please contact Quantinuum or Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX31)

Category:

Licensing

Description:

License failed to validate: <ValidationResult>

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX32)

Category:

Licensing

Description:

Unexpected signature size. Supplied=<SuppliedSize>, Expected=<ExpectedSize>

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX33)

Category:

Licensing

Description:

Unsupported key type, only EC keys are supported

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX34)

Category:

Licensing

Description:

Unexpected EC point size, only SECP521R1 keys are supported

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX35)

Category:

Licensing

Description:

Unexpected mode string

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX36)

Category:

Licensing

Description:

Unexpected restriction type

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX37)

Category:

Licensing

Description:

Attempted to serialise an unknown restriction

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX38)

Category:

Licensing

Description:

Failed to parse license start date

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX39)

Category:

Licensing

Description:

Failed to parse license end date

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX40)

Category:

Licensing

Description:

Invalid UUID in license: <UUID>

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX41)

Category:

Licensing

Description:

Failed to parse license creation time

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX42)

Category:

Licensing

Description:

License file at <location> does not exist

Comments:

No license could be found at the specified <location>.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX43)

Category:

Licensing

Description:

No license content found

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX44)

Category:

Licensing

Description:

No license signing public key content found

Comments:

The supplied license has not been configured correctly. Please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX45)

Category:

Licensing

Description:

Error parsing license data: <cause>

Comments:

A license block has been specified, but is either empty or invalid. Please check. The cause of the failure is appended to the error message. If the data appears ok, please contact Quantum Origin support.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX46)

Category:

Generation

Description:

Library failed to install the extractor WSR handler. Errorcode: <cause>

Comments:

Failed to install the extractor WSR. The cause of the failure is appended to the error message.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX47)

Category:

Generation

Description:

Generate randomness failed: <cause>

Comments:

The extraction of randomness failed. The cause of the failure is appended to the error message.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX48)

Category:

Generation

Description:

WSR is uninitialised

Comments:

The extractor cannot be initialised without a valid WSR, but the WSR failed to initialise.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX49)

Category:

Extractor

Description:

Error opening WSR

Comments:

The WSR file/device could not be opened by the extractor. Please check and reconfigure as needed.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX50)

Category:

Extractor

Description:

WSR not initialized

Comments:

The extractor cannot be initialised without a valid WSR, but the WSR failed to initialise. Please check and reconfigure as needed.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX51)

Category:

Extractor

Description:

Error reading data from WSR

Comments:

An error occurred reading from the WSR device.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX52)

Category:

Extractor

Description:

WSR health test failed

Comments:

One or more of the WSR health tests has failed. These tests are in accordance with NIST 800-90B. If this test has failed, it may be transient, but if it persists, please check your WSR or use an alternate source.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX53)

Category:

Extractor

Description:

WSR NIST 800-90B repetition count health test failed

Comments:

The randomness data supplied by the WSR failed the repetition count health test. If this persists, please check or use a different source of local randomness.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX54)

Category:

Extractor

Description:

WSR NIST 800-90B adaptive proportion health test failed

Comments:

The randomness data supplied by the WSR failed the adaptive proportion health test. If this persists, please check or use a different source of local randomness.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX55)

Category:

Extractor

Description:

Number of WSR health-test failures exceeded permitted maximum

Comments:

The randomness data supplied by the WSR has repeatedly failed one or more health tests. Please check or use a different source of local randomness.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX56)

Category:

WSR

Description:

Path is a circular symlink

Comments:

The supplied WSR path is a symlink that cannot be resolved to a real file or device. Please investigate and reconfigure.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX57)

Category:

WSR

Description:

Cannot read <RequestedSize> bytes of WSR (max <MaxPermittedSize>)

Comments:

The number of bytes being requested from the WSR (<RequestedSize>) exceeds the OS permitted maximum for that device-type (<MaxPermittedSize>)


Error Code: ERC_QOSDK_STD_EXCEPTION(EX58)

Category:

WSR

Description:

Failed reading from WSR file: End of file reached

Comments:

Reading data from the WSR failed, most likely due to the supply of randomness becoming exhausted. Please check or use a different source of local randomness.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX59)

Category:

WSR

Description:

Failed reading from WSR file: <cause>

Comments:

An error occurred reading from the WSR device. The cause of the failure is appended to the error message.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX60)

Category:

WSR

Description:

A terminal device cannot be used as a WSR

Comments:

Please select a suitable file or device to use as a WSR. e.g. a real file or a device similar in functionality to that of /dev/random.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX61)

Category:

WSR

Description:

WSR path is a directory instead of file

Comments:

Check the nature of the supplied WSR file/device, and reconfigure as needed.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX62)

Category:

WSR

Description:

WSR file cannot be opened: <cause>

Comments:

The configured WSR file/device failed to open. The cause of the failure is appended to the error message. Please check the type and availability of the supplied WSR file/device, and reconfigure as needed.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX63)

Category:

WSR

Description:

RDSEED not supported

Comments:

RDSEED is not implemented on this processor/platform.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX64)

Category:

WSR

Description:

Failed to fetch <RequestedSize> bytes from randomness source

Comments:

This error is most commonly caused by a WSR callback function returning a non-zero return code - which could indeed be a real failure or randomness exhaustion.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX65)

Category:

WSR

Description:

WSR no longer functioning due to health-test failure

Comments:

The randomness data supplied by the WSR has failed one or more health tests. Please check or use a different source of local randomness.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX66)

Category:

Jitter

Description:

Jitter is not supported on this platform (<PathToLibrary> was specified)

Comments:

Quantum Origin has been configured to use an external/3rdParty jitter library at location <PathToLibrary>, but Jitter is not (yet) supported on this platform


Error Code: ERC_QOSDK_STD_EXCEPTION(EX67)

Category:

Jitter

Description:

File at <PathToLibrary> is not a valid JitterEntropy library

Comments:

Quantum Origin has been configured to use an external/3rdParty jitter library at location <PathToLibrary>, but this library does not conform to the spec of a standard Jitter Library e.g. like that of smuellerDD on github.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX68)

Category:

Jitter

Description:

Cannot determine type of JitterEntropy library at <PathToLibrary>, behaviour inconsistent

Comments:

Quantum Origin has been configured to use an external/3rdParty jitter library at location <PathToLibrary>, but this library does not appear to be a valid Jitter library. A debug log entry has been written to the log containing more info.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX69)

Category:

Jitter

Description:

Library is not a valid JitterEntropy library

Comments:

Quantum Origin has been configured to use an external/3rdParty jitter library at location <PathToLibrary>, but this library does not conform to the spec of a standard Jitter Library e.g. like that of smuellerDD on github.


Error Code: ERC_QOSDK_STD_EXCEPTION(EX70)

Category:

Jitter

Description:

Could not load library named ‘<PathToLibrary>’

Comments:

Quantum Origin has been configured to use an external/3rdParty jitter library at location <PathToLibrary>, but this library cannot be loaded at this time.


Error Code: ERC_QOSDK_EPARAM_CALLBACK_PTR_NOT_SUPPLIED

Category:

Configuration

Description:

The required callback function parameter was not supplied

Comments:

The function, typically qosdk_setopt_wsr_callback() or qosdk_set_logging_callback(), requires a parameter which is a valid pointer to a user-written callback function, exported with the standard C calling convention. This pointer should not be NULL.


Error Code: ERC_QOSDK_EPARAM_VSNPRINTF

Category:

Configuration

Description:

An error occurred whilst using vsnprintf

Comments:

The function, typically qosdk_log_message(), accepts a variable number of arguments, similar to that of printf(). The supplied format/pMsg string or one-or-more of the associated arguments are not correct.


Error Code: ERC_QOSDK_EPARAM_MSG_BUFFER_NOT_SUPPLIED

Category:

Configuration

Description:

The required message buffer was not supplied

Comments:

The function, typically qosdk_log_message(), accepts a variable number of arguments, similar to that of printf(). The supplied format/pMsg string may not be NULL.


Error Code: ERC_QOSDK_FAILED_TO_ASSIGN_LICENSE_CONTENT

Category:

Configuration

Description:

Setting the license content failed

Comments:

The function qosdk_setopt_bytes(…, QOSDK_OPT_LICENSE_DATA, …) failed to install the licensed as requested. Check that the license is valid, of the correct size and authentic. If needed please contact Quantum Origin support.


Error Code: ERC_QOSDK_EPARAM_INVALID_SIZE

Category:

Configuration

Description:

Size parameter is not valid

Comments:

The unsigned size parameter supplied is out of range. e.g. in the case of both qosdk_setopt_bytes() and qosdk_get_randomness(), the maximum is set to 1GiB (0x40000000). Check also that you are not inadvertently passing a negative signed value that is being misinterpreted as a large positive integer.


Error Code: ERC_QOSDK_EPARAM_INVALID_CACHETYPE

Category:

Configuration

Description:

Invalid or unsupported Cache Type

Comments:

The function qosdk_setopt_int(…,QOSDK_OPT_CACHE_TYPE,…) does not support the value requested. Please refer to the tQOSDK_CACHETYPE section in quantum_origin_sdk_c.h for supported values.


Error Code: ERC_QOSDK_EPARAM_HEALTH_TESTS_NOT_SUPPORTED

Category:

Configuration

Description:

Health tests are not supported in this version

Comments:

An attempt was made to enable the Output Health tests using qosdk_setopt_int(…, QOSDK_OPT_HEALTH_TESTS_OUTPUT, …), but these are not supported in this version. No action was taken. This return code can be treated as purely informative, or as a warning.


Error Code: ERC_QOSDK_EPARAM_INVALID_LOGLEVEL

Category:

Configuration

Description:

Invalid or unsupported Log Level

Comments:

The function qosdk_setopt_int(…,QOSDK_OPT_LOGGING_LEVEL,…) does not support the value requested. Please refer to the tQOSDK_LOGLEVEL section in quantum_origin_sdk_c.h for supported values.


Error Code: ERC_QOSDK_EPARAM_INVALID_LOGMODE

Category:

Configuration

Description:

Invalid or unsupported Log Mode

Comments:

The function qosdk_setopt_int(…,QOSDK_OPT_LOGGING_MODE,…) does not support the value requested. Please refer to the tQOSDK_LOGMODE section in quantum_origin_sdk_c.h for supported values.


Error Code: ERC_QOSDK_EPARAM_INVALID_WSRTYPE

Category:

Configuration

Description:

Invalid or unsupported WSR Type

Comments:

The function qosdk_setopt_int(…,QOSDK_OPT_WSR_TYPE,…) does not support the value requested. Please refer to the tQOSDK_WSRTYPE section in quantum_origin_sdk_c.h for supported values.


Error Code: ERC_QOSDK_EPARAM_INVALID_OPERATIONMODE

Category:

Configuration

Description:

Invalid or unsupported Operational Mode

Comments:

The function qosdk_setopt_int(…,QOSDK_OPT_OPERATION_MODE,…) does not support the value requested. Please refer to the tQOSDK_OPMODE section in quantum_origin_sdk_c.h for supported values


Error Code: ERC_QOSDK_FAILED_TO_INITIALISE_LOGGING

Category:

Logging

Description:

Failed to initialise logging subsystem

Comments:

The logging subsystem failed to initialise using the given configuration. Please check the parameters and callbacks.


Error Code: ERC_QOSDK_PLATFORM_NOT_SUPPORTED

Category:

Configuration

Description:

Platform not supported

Comments:

The current Platform/Operating System/Distro is not currently supported


Error Code: ERC_QOSDK_FAILED_TO_SET_LOGGING_CALLBACK

Category:

Configuration

Description:

Failed to set logging callback

Comments:

The logging subsystem failed to initialise using the given callback and configuration. Please check the parameters and callbacks.


Error Code: ERC_QOSDK_ADAPTIVE_PROPORTION_HEALTH_TEST_FAILURE

Category:

Health Tests

Description:

Adaptive proportion health test on WSR randomness failed

Comments:

Quantum Origin routinely performs health tests on the inbound ‘Local Source of Randomness’ (LSR/WSR) in accordance with Adaptive Proportion Test (NIST 800-90B section 4.4.2). This test has failed. It may be transient, but the condition of your local randomness source should be checked.


Error Code: ERC_QOSDK_REPETITION_COUNT_HEALTH_TEST_FAILURE

Category:

Health Tests

Description:

Repetition count health test on WSR randomness failed

Comments:

Quantum Origin routinely performs health tests on the inbound ‘Local Source of Randomness’ (LSR/WSR) in accordance with Repetition Count Test (NIST 800-90B section 4.4.1). This test has failed. It may be transient, but the condition of your local randomness source should be checked.


Error Code: ERC_QOSDK_OUTPUT_ADAPTIVE_PROPORTION_HEALTH_TEST_FAILURE

Category:

Health Tests

Description:

Adaptive proportion health test on output randomness failed

Comments:

If output health tests are supported in the current build, and if enabled using QOSDK_OPT_HEALTH_TESTS_OUTPUT, health tests are performed on the generated randomness. These tests are in accordance with Adaptive Proportion Test (NIST 800-90B section 4.4.2). If this test has failed, it may be transient, but if it persists, please contact Quantum Origin support.


Error Code: ERC_QOSDK_OUTPUT_REPETITION_COUNT_HEALTH_TEST_FAILURE

Category:

Health Tests

Description:

Repetition count health test on output randomness failed

Comments:

If output health tests are supported in the current build, and if enabled using QOSDK_OPT_HEALTH_TESTS_OUTPUT, health tests are performed on the generated randomness. These tests are in accordance with Repetition Count Test (NIST 800-90B section 4.4.1). If this test has failed, it may be transient, but if it persists, please contact Quantum Origin support.


Error Code: ERC_QOSDK_TIMEOUT_WAITING_FOR_RANDOMNESS

Category:

Generation

Description:

Timed out waiting for background threads to generate randomness

Comments:

Time out occurred while waiting for randomness from the cache. Please see logs for any errors from extractor threads.