Skip to content

Commit

Permalink
Merge pull request #113 from VirgilSecurity/release/v0.10.2
Browse files Browse the repository at this point in the history
Release v0.10.2

Features:
  - Lib/Foundation: Added support for managing recipients within MessageInfo
  - Lib/PHE: Added PHE Cipher additional data support

Changes:
  - Wrapper/Java: Run java benchmark with a profile only
  • Loading branch information
SergeySeroshtan authored Sep 9, 2019
2 parents cce5e16 + c65ecd7 commit 0d15761
Show file tree
Hide file tree
Showing 92 changed files with 3,851 additions and 296 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.11 FATAL_ERROR)

project(virgil_crypto VERSION 0.10.1 LANGUAGES C)
project(virgil_crypto VERSION 0.10.2 LANGUAGES C)


# ---------------------------------------------------------------------------
Expand Down
12 changes: 12 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# virgil-crypto-c ChangeLog (Sorted by date)


## Version 0.10.2 released 2019-09-09

### Features

- Lib/Foundation: Added support for managing recipients within MessageInfo
- Lib/PHE: Added PHE Cipher additional data support

### Changes

- Wrapper/Java: Run java benchmark with a profile only


## Version 0.10.1 released 2019-09-02

### Bugfix
Expand Down
501 changes: 252 additions & 249 deletions Jenkinsfile

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.1
0.10.2
4 changes: 2 additions & 2 deletions VSCCrypto.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = "VSCCrypto"
s.version = "0.10.1"
s.version = "0.10.2"
s.license = { :type => "BSD", :file => "Carthage/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"
s.authors = { "Virgil Security" => "https://virgilsecurity.com/" }
s.source = { :http => "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v0.10.1/VSCCrypto.framework.zip" }
s.source = { :http => "https://github.com/VirgilSecurity/virgil-crypto-c/releases/download/v0.10.2/VSCCrypto.framework.zip" }
s.ios.deployment_target = "9.0"
s.osx.deployment_target = "10.9"
s.tvos.deployment_target = "9.0"
Expand Down
2 changes: 1 addition & 1 deletion codegen/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<library name="nanopb"/>
<library name="relic"/>

<version major="0" minor="10" patch="1"/>
<version major="0" minor="10" patch="2"/>

<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="10" patch="1"/>
<version major="0" minor="10" patch="2"/>

<license>
Copyright (C) 2015-2019 Virgil Security, Inc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
</method>


<method name="remove self" visibility="private">
Remove current node.
</method>


<method name="has item" is_const="1">
Return true if given list has item.

Expand Down Expand Up @@ -41,6 +46,13 @@
</method>


<method name="next modifiable" visibility="private">
Return next list node if exists, or NULL otherwise.

<return class="self" access="readwrite"/>
</method>


<method name="has prev" is_const="1">
Return true if list has previous item.

Expand Down
7 changes: 7 additions & 0 deletions codegen/models/project_foundation/class_message_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
</method>


<method name="key recipient info list modifiable" visibility="private">
Return list with a "key recipient info" elements.

<return class="key recipient info list" access="readwrite"/>
</method>


<method name="password recipient info list" is_const="1">
Return list with a "password recipient info" elements.

Expand Down
79 changes: 79 additions & 0 deletions codegen/models/project_foundation/class_message_info_editor.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<class name="message info editor">
Add and/or remove recipients and it's paramteres within message info.

Usage:
1. Unpack binary message info that was obtained from RecipientCipher.
2. Add and/or remove key recipients.
3. Pack MessagInfo to the binary data.

<require interface="encrypt"/>
<require interface="decrypt"/>
<require interface="public key"/>
<require interface="private key"/>
<require interface="key cipher"/>
<require interface="message info serializer"/>
<require class="alg factory"/>
<require class="key alg factory"/>
<require class="key provider"/>
<require impl="ctr drbg"/>
<require impl="message info der serializer"/>

<dependency name="random" interface="random"/>
<property name="message info" class="message info"/>
<property name="message info serializer" interface="message info serializer"/>
<property name="encryption key" class="buffer"/>

<method name="setup defaults">
Set depenencies to it's defaults.

<return enum="status"/>
</method>

<method name="unpack">
Unpack serialized message info.

<argument name="message info data" class="data"/>
<argument name="owner recipient id" class="data"/>
<argument name="owner private key" interface="private key"/>

<return enum="status"/>
</method>

<method name="add key recipient">
Add recipient defined with id and public key.

<argument name="recipient id" class="data"/>
<argument name="public key" interface="public key"/>

<return enum="status"/>
</method>

<method name="remove key recipient">
Remove recipient with a given id.
Return false if recipient with given id was not found.

<argument name="recipient id" class="data"/>

<return type="boolean"/>
</method>

<method name="remove all">
Remove all existent recipients.
</method>

<method name="packed len" is_const="1">
Return length of serialized message info.
Actual length can be obtained right after applying changes.

<return type="size"/>
</method>

<method name="pack">
Return serialized message info.
Precondition: this method can be called after "apply".

<argument name="message info" class="buffer">
<length method="packed len"/>
</argument>
</method>
</class>
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<method name="message info len" is_const="1">
Return buffer length required to hold message info returned by the
"start encryption" method.
"pack message info" method.
Precondition: all recipients and custom parameters should be set.

<return type="size"/>
Expand Down
3 changes: 2 additions & 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"
>

<version major="0" minor="10" patch="1"/>
<version major="0" minor="10" patch="2"/>

<license>
Copyright (C) 2015-2019 Virgil Security, Inc.
Expand Down Expand Up @@ -139,6 +139,7 @@
<class name="group session"/>
<class name="group session epoch"/>
<class name="group session epoch node"/>
<class name="message info editor"/>

<implementor name="mbedtls"/>
<implementor name="mbedtls pk"/>
Expand Down
57 changes: 57 additions & 0 deletions codegen/models/project_phe/class_phe_cipher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,61 @@
</return>
</method>

<method name="auth encrypt">
Encrypts data (and authenticates additional data) using account key

<argument name="plain text" class="data">
Data to encrypt
</argument>

<argument name="additional data" class="data">
Data to authenticate
</argument>

<argument name="account key" class="data">
Account key
</argument>

<argument name="cipher text" class="buffer" access="writeonly">
Encrypted data

<length method="encrypt len">
<proxy argument="plain text" to="plain text len" cast="data_length"/>
</length>
</argument>

<return enum="status">
- vsce_error_AES_ERROR in case AES returned error
- vsce_error_RNG_ERROR in case rng failed
</return>
</method>

<method name="auth decrypt">
Decrypts data (and verifies additional data) using account key

<argument name="cipher text" class="data">
Encrypted data
</argument>

<argument name="additional data" class="data">
Data to authenticate
</argument>

<argument name="account key" class="data">
Account key
</argument>

<argument name="plain text" class="buffer" access="writeonly">
Encrypted data

<length method="decrypt len">
<proxy argument="cipher text" to="cipher text len" cast="data_length"/>
</length>
</argument>

<return enum="status">
- vsce_error_AES_ERROR in case AES returned error
</return>
</method>

</class>
3 changes: 3 additions & 0 deletions codegen/models/project_phe/class_phe_common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@
<constant name="phe max decrypt len" value="1024 * 1024">
Maximum data size to decrypt
</constant>
<constant name="phe max auth len" value="1024">
Maximum data to authenticate
</constant>
</class>
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"
>

<version major="0" minor="10" patch="1"/>
<version major="0" minor="10" patch="2"/>

<license>
Copyright (C) 2015-2019 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"
>

<version major="0" minor="10" patch="1"/>
<version major="0" minor="10" patch="2"/>

<license>
Copyright (C) 2015-2019 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,python,wasm"
>

<version major="0" minor="10" patch="1"/>
<version major="0" minor="10" patch="2"/>

<license>
Copyright (C) 2015-2019 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 @@ -116,7 +116,7 @@ extern "C" {

#define VSC_VERSION_MINOR 10

#define VSC_VERSION_PATCH 1
#define VSC_VERSION_PATCH 2

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

Expand Down
3 changes: 2 additions & 1 deletion library/common/src/vsc_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ vsc_buffer_alloc(vsc_buffer_t *self, size_t capacity) {
self->capacity = capacity;
self->len = 0;
self->bytes_dealloc_cb = vsc_dealloc;
self->is_owner = true;
}

//
Expand All @@ -453,7 +454,7 @@ vsc_buffer_release(vsc_buffer_t *self) {

self->bytes = NULL;
self->bytes_dealloc_cb = NULL;
self->is_owner = 0;
self->is_owner = false;
}

//
Expand Down
1 change: 1 addition & 0 deletions library/foundation/definitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ target_compile_definitions(foundation
"VSCF_GROUP_SESSION=$<BOOL:${VSCF_GROUP_SESSION}>"
"VSCF_GROUP_SESSION_EPOCH=$<BOOL:${VSCF_GROUP_SESSION_EPOCH}>"
"VSCF_GROUP_SESSION_EPOCH_NODE=$<BOOL:${VSCF_GROUP_SESSION_EPOCH_NODE}>"
"VSCF_MESSAGE_INFO_EDITOR=$<BOOL:${VSCF_MESSAGE_INFO_EDITOR}>"
PRIVATE
$<$<BOOL:${BUILD_SHARED_LIBS}>:VSCF_BUILD_SHARED_LIBS>
)
Loading

0 comments on commit 0d15761

Please sign in to comment.