Skip to content

Commit

Permalink
Version 0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoftco committed Sep 1, 2022
1 parent 5e6e998 commit 0f757a7
Show file tree
Hide file tree
Showing 324 changed files with 36,026 additions and 44,831 deletions.
7 changes: 7 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Version 0.7.2 - September 1, 2022
- Added library version retrieval functions
std::string oqs::oqs_version()
std::string oqs::oqs_cpp_version()
- Bumped GoogleTest version to 1.12.1
https://github.com/google/googletest/commit/58d77fa8070e8cec2dc1ed015d66b454c8d78850

Version 0.7.1 - January 5, 2022
- Release numbering updated to match liboqs
- Integrated the unit tests with the main project, so now the unit tests
Expand Down
19 changes: 12 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
cmake_minimum_required(VERSION 3.10)
project(oqs_cpp VERSION 0.7.1 LANGUAGES CXX)
set(OQS_CPP_VERSION_NUM 0.7.2)
set(OQS_CPP_VERSION_STR "${OQS_CPP_VERSION_NUM}")
project(oqs_cpp VERSION ${OQS_CPP_VERSION_NUM} LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
enable_testing()

# add all examples
# liboqs-cpp version number
add_definitions(-DOQS_CPP_VERSION="${OQS_CPP_VERSION_STR}")

# Add all examples
aux_source_directory(examples EXAMPLE_FILES)

# path to liboqs include and lib, modify as needed
# Path to liboqs include and lib, modify as needed
if (NOT WIN32)
set(LIBOQS_INCLUDE_DIR "/usr/local/include" CACHE PATH
"Path to liboqs include directory")
set(LIBOQS_LIB_DIR "/usr/local/lib" CACHE PATH
"Path to liboqs lib directory")
else ()
# increase the stack size to 8MB on Windows
# Increase the stack size to 8MB on Windows
if (MSVC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:8388608")
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" OR ${CMAKE_CXX_COMPILER_ID}
Expand Down Expand Up @@ -47,7 +52,7 @@ include_directories("include")
include_directories(SYSTEM "${LIBOQS_INCLUDE_DIR}")
link_directories("${LIBOQS_LIB_DIR}")

# default build type
# Default build type
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: \
Expand All @@ -58,13 +63,13 @@ endif ()
#### Unit testing
add_subdirectory(unit_tests/)

# enable all warnings for GNU gcc and Clang/AppleClang
# Enable all warnings for GNU gcc and Clang/AppleClang
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" OR ${CMAKE_CXX_COMPILER_ID}
STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Weffc++")
endif ()

# build all executables in ${EXAMPLE_FILES}
# Build all executables in ${EXAMPLE_FILES}
foreach (FILE ${EXAMPLE_FILES})
get_filename_component(TARGET_NAME ${FILE} NAME_WE)
add_executable(${TARGET_NAME} ${FILE})
Expand Down
519 changes: 336 additions & 183 deletions Doxyfile

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2020 Open Quantum Safe
Copyright (c) 2019-2022 Open Quantum Safe

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ and [Michele Mosca](http://faculty.iqc.uwaterloo.ca/mmosca/) at the University
of Waterloo.

liboqs-cpp was developed by [Vlad Gheorghiu](http://vsoftco.github.io) at
evolutionQ and University of Waterloo.
softwareQ Inc. and University of Waterloo.

### Support

Expand All @@ -203,7 +203,7 @@ Amazon Web Services and the Canadian Centre for Cyber Security.

We'd like to make a special acknowledgement to the companies who have dedicated
programmer time to contribute source code to OQS, including Amazon Web Services,
evolutionQ, and Microsoft Research.
evolutionQ, softwareQ, and Microsoft Research.

Research projects which developed specific components of OQS have been supported
by various research grants, including funding from the Natural Sciences and
Expand Down
9 changes: 4 additions & 5 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
liboqs-cpp version 0.7.1
liboqs-cpp version 0.7.2
========================

About
Expand All @@ -13,15 +13,14 @@ The **Open Quantum Safe (OQS) project** has the goal of developing and prototypi
Release notes
=============

This release of liboqs-cpp was released on January 5, 2022. Its release page on GitHub is https://github.com/open-quantum-safe/liboqs-cpp/releases/tag/0.7.1.
This release of liboqs-cpp was released on September 1, 2022. Its release page on GitHub is https://github.com/open-quantum-safe/liboqs-cpp/releases/tag/0.7.2.

What's New
----------

This is the ninth release of liboqs-cpp.
This is the 10th release of liboqs-cpp.

This is an incremental minor change release.

For a list of changes
see [CHANGES.txt](https://github.com/open-quantum-safe/liboqs-cpp/blob/main/CHANGES.txt)
.
see [CHANGES.txt](https://github.com/open-quantum-safe/liboqs-cpp/blob/main/CHANGES.txt).
2 changes: 2 additions & 0 deletions examples/kem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

int main() {
std::cout << std::boolalpha;
std::cout << "liboqs version: " << oqs::oqs_version() << '\n';
std::cout << "liboqs-cpp version: " << oqs::oqs_cpp_version() << '\n';
std::cout << "Enabled KEMs:\n" << oqs::KEMs::get_enabled_KEMs();

std::string kem_name = "Kyber512";
Expand Down
4 changes: 4 additions & 0 deletions examples/rand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ int main() {
entropy_seed[20] = 200;
entropy_seed[47] = 150;
oqs::rand::randombytes_nist_kat_init_256bit(entropy_seed);

std::cout << "liboqs version: " << oqs::oqs_version() << '\n';
std::cout << "liboqs-cpp version: " << oqs::oqs_cpp_version() << '\n';

std::cout << std::setw(18) << std::left;
std::cout << "NIST-KAT: " << oqs::rand::randombytes(32) << '\n';

Expand Down
2 changes: 2 additions & 0 deletions examples/sig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

int main() {
std::cout << std::boolalpha;
std::cout << "liboqs version: " << oqs::oqs_version() << '\n';
std::cout << "liboqs-cpp version: " << oqs::oqs_cpp_version() << '\n';
std::cout << "Enabled signatures:\n" << oqs::Sigs::get_enabled_sigs();

oqs::bytes message = "This is the message to sign"_bytes;
Expand Down
12 changes: 12 additions & 0 deletions include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ using byte = std::uint8_t; ///< byte (unsigned)
using bytes = std::vector<byte>; ///< vector of bytes (unsigned)
using OQS_STATUS = C::OQS_STATUS; ///< bring OQS_STATUS into the oqs namespace

/**
* \brief liboqs version string
* \return liboqs version string
*/
inline std::string oqs_version() { return oqs::C::OQS_version(); }

/**
* \brief liboqs-cpp version string
* \return liboqs-cpp version string
*/
inline std::string oqs_cpp_version() { return OQS_CPP_VERSION; }

/**
* \brief Sets to zero the content of \a v by invoking the liboqs
* OQS_MEM_cleanse() function. Use it to clean "hot" memory areas, such as
Expand Down
11 changes: 10 additions & 1 deletion include/oqs_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,16 @@ class Init final : public internal::Singleton<const Init> {
* \brief Private default constructor
* \note Use oqs::internal::Init::get_instance() to create an instance
*/
Init() { C::OQS_init(); }
Init() {
C::OQS_init();
std::string oqs_ver = oqs_version();
std::string oqs_cpp_ver = oqs_cpp_version();
if (oqs_ver != oqs_cpp_ver) {
std::cerr << "Warning! liboqs version " << oqs_ver
<< " differs from liboqs-python version " << oqs_cpp_ver
<< std::endl;
}
}
};
static const Init& init_ = Init::get_instance(); ///< liboqs initialization
// instantiate the KEMs and Sigs singletons (if ever needed)
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if (MSVC)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
endif ()

add_subdirectory(lib/googletest-release-1.10.0)
add_subdirectory(lib/googletest-release-1.12.1)

aux_source_directory(tests TEST_FILES)

Expand Down
73 changes: 0 additions & 73 deletions unit_tests/lib/googletest-release-1.10.0/.travis.yml

This file was deleted.

Loading

0 comments on commit 0f757a7

Please sign in to comment.