Skip to content

Commit

Permalink
Merge pull request #172 from VirgilSecurity/release/0.17.1
Browse files Browse the repository at this point in the history
Release 0.17.1
  • Loading branch information
SergeySeroshtan committed Aug 13, 2023
2 parents 895ed15 + 3846723 commit 40ae523
Show file tree
Hide file tree
Showing 65 changed files with 349 additions and 314 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

cmake_minimum_required(VERSION 3.12 FATAL_ERROR)

project(virgil_crypto VERSION 0.17.0 LANGUAGES C)
project(virgil_crypto VERSION 0.17.1 LANGUAGES C)


# ---------------------------------------------------------------------------
Expand Down
11 changes: 9 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# virgil-crypto-c ChangeLog (Sorted by date)

## Version 0.17.0 released 2023-08-09
## Version 0.17.1 released 2023-08-13

### Changes

- Ext: Fix relic version 0.4.0
- Lib/Pythia: Restore backward compatibility by using fixed relic version 0.4.1


## Version 0.17.0 released 2023-08-09

### Changes

- Apple: Remove support for Apple BITCODE
- Apple: Bump min supported macOS version to 10.13
- Ext: Upgrade Relic to the version 0.6.0
- This version is **incompatible** with 0.5
- This version is **incompatible** with 0.4
- Lib/Pythia: Adopt to incompatible Relic version
- Now `blind()` produce different value, so stored blinded values can not be `deblinded()`
- Apple: Move support of CocoaPods and SPM from https://github.com/VirgilSecurity/virgil-cryptowrapper-x to this repo
Expand Down
10 changes: 5 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import PackageDescription

let version = "0.17.0"
let version = "0.17.1"
let useLocalBinaries = false

let vscCommonBinaryTarget = {
if (useLocalBinaries) {
return Target.binaryTarget(name: "VSCCommon", path: "binaries//VSCCommon.xcframework.zip")
} else {
let vscCommonChecksum = "bb476008c212720ee878efdb5c8fb8b763a8573ca4dd0531edb3a62a4f812ca5"
let vscCommonChecksum = "99193a9c8a71cebcaadf282ac2f4d5d398f1dee8567799d6a0cdd3e3d63ba1a3"
return Target.binaryTarget(
name: "VSCCommon",
url: "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v\(version)/VSCCommon.xcframework.zip",
Expand All @@ -22,7 +22,7 @@ let vscFoundationBinaryTarget = {
if (useLocalBinaries) {
return Target.binaryTarget(name: "VSCFoundation", path: "binaries//VSCFoundation.xcframework.zip")
} else {
let vscFoundationChecksum = "fe21fa73c6098f22d7451a5504adc45be575c6e781fea91616c27ec00c4c0a0a"
let vscFoundationChecksum = "b38a85c73b033dc62b55e1d7c7e4988504176b451fd2e87eaad86b616921276a"
return Target.binaryTarget(
name: "VSCFoundation",
url: "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v\(version)/VSCFoundation.xcframework.zip",
Expand All @@ -35,7 +35,7 @@ let vscPythiaBinaryTarget = {
if (useLocalBinaries) {
return Target.binaryTarget(name: "VSCPythia", path: "binaries//VSCPythia.xcframework.zip")
} else {
let vscPythiaChecksum = "30e61166b400aaccc46c016c1d2e6db490311fbf07dfde081406ca2f69a53560"
let vscPythiaChecksum = "6d5fde11d0ff1c531a7943006a4b1816e37135ea5692f60f47497b9049a649b5"
return Target.binaryTarget(
name: "VSCPythia",
url: "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v\(version)/VSCPythia.xcframework.zip",
Expand All @@ -48,7 +48,7 @@ let vscRatchetBinaryTarget = {
if (useLocalBinaries) {
return Target.binaryTarget(name: "VSCRatchet", path: "binaries//VSCRatchet.xcframework.zip")
} else {
let vscRatchetChecksum = "632f5ea5f696870c0433fdb0d39f921d495057988ad28c9b65ec8170007eefc6"
let vscRatchetChecksum = "31e8e7ed15c7596262546b53ec36622876f2025f855799e22346d3bf13c0291a"
return Target.binaryTarget(
name: "VSCRatchet",
url: "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v\(version)/VSCRatchet.xcframework.zip",
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.17.0
0.17.1
2 changes: 1 addition & 1 deletion VSCCrypto.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "VSCCrypto"
s.version = "0.17.0"
s.version = "0.17.1"
s.license = { :type => "BSD", :file => "VSCCrypto-XCFrameworks/LICENSE" }
s.summary = "Contains basic c functions classes for creating key pairs, encrypting/decrypting data, signing data and verifying signatures."
s.homepage = "https://github.com/VirgilSecurity/virgil-crypto-c"
Expand Down
6 changes: 3 additions & 3 deletions VirgilCryptoFoundation.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "VirgilCryptoFoundation"
s.version = "0.17.0"
s.version = "0.17.1"
s.swift_version = "5.0"
s.license = { :type => "BSD", :file => "LICENSE" }
s.summary = "Contains basic swift classes for creating key pairs, encrypting/decrypting data, signing data and verifying signatures."
Expand All @@ -13,6 +13,6 @@ Pod::Spec.new do |s|
s.watchos.deployment_target = "4.0"
s.public_header_files = "wrappers/swift/VirgilCrypto/VirgilCryptoFoundation/VirgilCryptoFoundation.h"
s.source_files = "wrappers/swift/VirgilCrypto/VirgilCryptoFoundation/**/*.{h,mm,swift}"
s.dependency "VSCCrypto/Common", "= 0.17.0"
s.dependency "VSCCrypto/Foundation", "= 0.17.0"
s.dependency "VSCCrypto/Common", "= 0.17.1"
s.dependency "VSCCrypto/Foundation", "= 0.17.1"
end
10 changes: 5 additions & 5 deletions VirgilCryptoPythia.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "VirgilCryptoPythia"
s.version = "0.17.0"
s.version = "0.17.1"
s.swift_version = "5.0"
s.license = { :type => "BSD", :file => "LICENSE" }
s.summary = "Contains swift classes working with Pythia crypto."
Expand All @@ -13,8 +13,8 @@ Pod::Spec.new do |s|
s.watchos.deployment_target = "4.0"
s.public_header_files = "wrappers/swift/VirgilCrypto/VirgilCryptoPythia/VirgilCryptoPythia.h"
s.source_files = "wrappers/swift/VirgilCrypto/VirgilCryptoPythia/**/*.{h,mm,swift}"
s.dependency "VirgilCryptoFoundation", "= 0.17.0"
s.dependency "VSCCrypto/Common", "= 0.17.0"
s.dependency "VSCCrypto/Foundation", "= 0.17.0"
s.dependency "VSCCrypto/Pythia", "= 0.17.0"
s.dependency "VirgilCryptoFoundation", "= 0.17.1"
s.dependency "VSCCrypto/Common", "= 0.17.1"
s.dependency "VSCCrypto/Foundation", "= 0.17.1"
s.dependency "VSCCrypto/Pythia", "= 0.17.1"
end
10 changes: 5 additions & 5 deletions VirgilCryptoRatchet.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "VirgilCryptoRatchet"
s.version = "0.17.0"
s.version = "0.17.1"
s.swift_version = "5.0"
s.license = { :type => "BSD", :file => "LICENSE" }
s.summary = "Contains swift for double ratchet crypto operations."
Expand All @@ -13,8 +13,8 @@ Pod::Spec.new do |s|
s.watchos.deployment_target = "4.0"
s.public_header_files = "wrappers/swift/VirgilCrypto/VirgilCryptoRatchet/VirgilCryptoRatchet.h"
s.source_files = "wrappers/swift/VirgilCrypto/VirgilCryptoRatchet/**/*.{h,mm,swift}"
s.dependency "VirgilCryptoFoundation", "= 0.17.0"
s.dependency "VSCCrypto/Common", "= 0.17.0"
s.dependency "VSCCrypto/Foundation", "= 0.17.0"
s.dependency "VSCCrypto/Ratchet", "= 0.17.0"
s.dependency "VirgilCryptoFoundation", "= 0.17.1"
s.dependency "VSCCrypto/Common", "= 0.17.1"
s.dependency "VSCCrypto/Foundation", "= 0.17.1"
s.dependency "VSCCrypto/Ratchet", "= 0.17.1"
end
Binary file modified binaries/VSCCommon.xcframework.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion binaries/VSCCommon.xcframework.zip.sha256sum
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bb476008c212720ee878efdb5c8fb8b763a8573ca4dd0531edb3a62a4f812ca5
99193a9c8a71cebcaadf282ac2f4d5d398f1dee8567799d6a0cdd3e3d63ba1a3
Binary file modified binaries/VSCCrypto.xcframework.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion binaries/VSCCrypto.xcframework.zip.sha256sum
Original file line number Diff line number Diff line change
@@ -1 +1 @@
47fde4ca8cfb7dfb2a19bf9b671846a3dd3caa53b2d76ba269c33a1ec665f36b
3ba14650471da2dd64f04746c5f5c37ecd6394342c4a8a07f188558a61c39e01
Binary file modified binaries/VSCFoundation.xcframework.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion binaries/VSCFoundation.xcframework.zip.sha256sum
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fe21fa73c6098f22d7451a5504adc45be575c6e781fea91616c27ec00c4c0a0a
b38a85c73b033dc62b55e1d7c7e4988504176b451fd2e87eaad86b616921276a
Binary file modified binaries/VSCPythia.xcframework.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion binaries/VSCPythia.xcframework.zip.sha256sum
Original file line number Diff line number Diff line change
@@ -1 +1 @@
30e61166b400aaccc46c016c1d2e6db490311fbf07dfde081406ca2f69a53560
6d5fde11d0ff1c531a7943006a4b1816e37135ea5692f60f47497b9049a649b5
Binary file modified binaries/VSCRatchet.xcframework.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion binaries/VSCRatchet.xcframework.zip.sha256sum
Original file line number Diff line number Diff line change
@@ -1 +1 @@
632f5ea5f696870c0433fdb0d39f921d495057988ad28c9b65ec8170007eefc6
31e8e7ed15c7596262546b53ec36622876f2025f855799e22346d3bf13c0291a
2 changes: 1 addition & 1 deletion carthage-specs/VSCCommon.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"0.17.0": "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v0.17.0/VSCCommon.xcframework.zip"
"0.17.1": "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v0.17.1/VSCCommon.xcframework.zip"
}
2 changes: 1 addition & 1 deletion carthage-specs/VSCFoundation.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"0.17.0": "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v0.17.0/VSCFoundation.xcframework.zip"
"0.17.1": "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v0.17.1/VSCFoundation.xcframework.zip"
}
2 changes: 1 addition & 1 deletion carthage-specs/VSCPythia.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"0.17.0": "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v0.17.0/VSCPythia.xcframework.zip"
"0.17.1": "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v0.17.1/VSCPythia.xcframework.zip"
}
2 changes: 1 addition & 1 deletion carthage-specs/VSCRatchet.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"0.17.0": "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v0.17.0/VSCRatchet.xcframework.zip"
"0.17.1": "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v0.17.1/VSCRatchet.xcframework.zip"
}
2 changes: 1 addition & 1 deletion codegen/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<library name="round5"/>
<library name="falcon"/>

<version major="0" minor="17" patch="0"/>
<version major="0" minor="17" patch="1"/>

<project name="common" skip_codegen="0" skip_codegen_c="0" skip_codegen_wrappers="0"/>
<project name="foundation" skip_codegen="0" skip_codegen_c="0" skip_codegen_wrappers="0"/>
Expand Down
2 changes: 1 addition & 1 deletion codegen/models/project_common/project_common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
wrappers="python"
>

<version major="0" minor="17" patch="0"/>
<version major="0" minor="17" patch="1"/>

<license>
Copyright (C) 2015-2022 Virgil Security, Inc.
Expand Down
2 changes: 1 addition & 1 deletion codegen/models/project_foundation/project_foundation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
wrappers="swift,java,python,wasm,go,php"
>

<version major="0" minor="17" patch="0"/>
<version major="0" minor="17" patch="1"/>

<license>
Copyright (C) 2015-2022 Virgil Security, Inc.
Expand Down
2 changes: 1 addition & 1 deletion codegen/models/project_phe/project_phe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
wrappers="java,python,wasm,go,php"
>

<version major="0" minor="17" patch="0"/>
<version major="0" minor="17" patch="1"/>

<license>
Copyright (C) 2015-2022 Virgil Security, Inc.
Expand Down
2 changes: 1 addition & 1 deletion codegen/models/project_pythia/project_pythia.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
wrappers="java,swift,python,wasm,php"
>

<version major="0" minor="17" patch="0"/>
<version major="0" minor="17" patch="1"/>

<license>
Copyright (C) 2015-2022 Virgil Security, Inc.
Expand Down
2 changes: 1 addition & 1 deletion codegen/models/project_ratchet/project_ratchet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
wrappers="java,swift,wasm"
>

<version major="0" minor="17" patch="0"/>
<version major="0" minor="17" patch="1"/>

<license>
Copyright (C) 2015-2022 Virgil Security, Inc.
Expand Down
2 changes: 1 addition & 1 deletion library/common/include/virgil/crypto/common/vsc_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ extern "C" {

#define VSC_VERSION_MINOR 17

#define VSC_VERSION_PATCH 0
#define VSC_VERSION_PATCH 1

#define VSC_VERSION_MAKE(major, minor, patch) ((major) * 10000 + (minor) * 100 + (patch))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ extern "C" {

#define VSCF_VERSION_MINOR 17

#define VSCF_VERSION_PATCH 0
#define VSCF_VERSION_PATCH 1

#define VSCF_VERSION_MAKE(major, minor, patch) ((major) * 10000 + (minor) * 100 + (patch))

Expand Down
2 changes: 1 addition & 1 deletion library/phe/include/virgil/crypto/phe/vsce_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ extern "C" {

#define VSCE_VERSION_MINOR 17

#define VSCE_VERSION_PATCH 0
#define VSCE_VERSION_PATCH 1

#define VSCE_VERSION_MAKE(major, minor, patch) ((major) * 10000 + (minor) * 100 + (patch))

Expand Down
1 change: 1 addition & 0 deletions library/pythia/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ target_sources(pythia
${CMAKE_CURRENT_LIST_DIR}/src/pythia_buf_exports.h
${CMAKE_CURRENT_LIST_DIR}/src/pythia_buf_sizes_c.h
${CMAKE_CURRENT_LIST_DIR}/src/pythia_c.h
${CMAKE_CURRENT_LIST_DIR}/src/pythia_init_c.h

${CMAKE_CURRENT_LIST_DIR}/src/pythia_buf.c
${CMAKE_CURRENT_LIST_DIR}/src/pythia_buf_exports.c
Expand Down
2 changes: 1 addition & 1 deletion library/pythia/include/virgil/crypto/pythia/vscp_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ extern "C" {

#define VSCP_VERSION_MINOR 17

#define VSCP_VERSION_PATCH 0
#define VSCP_VERSION_PATCH 1

#define VSCP_VERSION_MAKE(major, minor, patch) ((major) * 10000 + (minor) * 100 + (patch))

Expand Down
15 changes: 7 additions & 8 deletions library/pythia/src/pythia_buf_exports.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@

#include <relic/relic.h>
#include <relic/relic_err.h>
#include <relic/relic_label.h>
#include <pythia.h>
#include "pythia_buf.h"
#include "pythia_buf_exports.h"

static void
check_size_read(const pythia_buf_t *buf, size_t min_size, size_t max_size) {
if (!buf || buf->len < min_size || buf->len > max_size)
RLC_THROW(ERR_NO_BUFFER);
THROW(ERR_NO_BUFFER);
}

static void
check_size_write(const pythia_buf_t *buf, size_t min_size) {
if (!buf || buf->allocated < min_size)
RLC_THROW(ERR_NO_BUFFER);
THROW(ERR_NO_BUFFER);
}

void
Expand All @@ -40,8 +39,8 @@ bn_read_buf(bn_t b, const pythia_buf_t *buf) {

uint8_t sign = buf->p[0];

if (sign != RLC_POS && sign != RLC_NEG)
RLC_THROW(ERR_NO_VALID);
if (sign != BN_POS && sign != BN_NEG)
THROW(ERR_NO_VALID);

bn_read_bin(b, buf->p + 1, (int)(buf->len - 1));
b->sign = sign;
Expand All @@ -57,7 +56,7 @@ gt_read_buf(gt_t g, const pythia_buf_t *buf) {
zeroBytes += buf->p[i] == 0;
}
if (zeroBytes > 24)
RLC_THROW(ERR_NO_VALID);
THROW(ERR_NO_VALID);

gt_read_bin(g, buf->p, (int)buf->len);
}
Expand All @@ -67,15 +66,15 @@ g1_read_buf(g1_t g, const pythia_buf_t *buf) {
check_size_read(buf, 1, PYTHIA_G1_BUF_SIZE);
g1_read_bin(g, buf->p, (int)buf->len);
if (!g1_is_valid(g))
RLC_THROW(ERR_NO_VALID);
THROW(ERR_NO_VALID);
}

void
g2_read_buf(g2_t g, const pythia_buf_t *buf) {
check_size_read(buf, 1, PYTHIA_G2_BUF_SIZE);
g2_read_bin(g, buf->p, (int)buf->len);
if (!g2_is_valid(g))
RLC_THROW(ERR_NO_VALID);
THROW(ERR_NO_VALID);
}

void
Expand Down
6 changes: 3 additions & 3 deletions library/pythia/src/pythia_buf_sizes_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

#include <relic/relic.h>

#define DEF_PYTHIA_G1_BUF_SIZE RLC_FP_BYTES + 1
#define DEF_PYTHIA_G1_BUF_SIZE FP_BYTES + 1

#define DEF_PYTHIA_G2_BUF_SIZE 2 * RLC_FP_BYTES + 1
#define DEF_PYTHIA_G2_BUF_SIZE 2 * FP_BYTES + 1

#define DEF_PYTHIA_GT_BUF_SIZE 8 * RLC_FP_BYTES
#define DEF_PYTHIA_GT_BUF_SIZE 8 * FP_BYTES

#define DEF_PYTHIA_BN_BUF_SIZE DEF_PYTHIA_G1_BUF_SIZE + 1

Expand Down
Loading

0 comments on commit 40ae523

Please sign in to comment.