enveloperb 0.0.0.1.ENOTAG → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -19,22 +19,24 @@ Except for testing purposes, it is not common to use envelope encryption in situ
19
19
 
20
20
  # Installation
21
21
 
22
- For the most common platforms, we provide "native" gems (which have the shared object that provides the cryptographic primitives pre-compiled).
23
- At present, we provide native gems for:
22
+ In order to build the `enveloperb` gem, you must have Rust 1.31.0 or later installed.
23
+ On an ARM-based platform, you must use Rust nightly, for SIMD intrinsics support.
24
24
 
25
- * Linux `x86_64` and `aarch64`
26
- * macOS `x86_64` and `arm64`
25
+ With that available, you should be able to install it like any other gem:
27
26
 
28
- On these platforms, you can just install the `enveloperb` gem via your preferred method, and it should "just work".
29
- If it doesn't, please [report that as a bug](https://github.com/cipherstash/enveloperb/issues).
27
+ gem install enveloperb
30
28
 
31
- For other platforms, you will need to install the source gem, which requires that you have Rust 1.57.0 or later installed.
32
- On ARM-based platforms, you must use Rust nightly, for SIMD intrinsics support.
29
+ There's also the wonders of [the Gemfile](http://bundler.io):
33
30
 
34
- ## Installing from Git
31
+ gem 'enveloperb'
35
32
 
36
- If you have a burning need to install directly from a checkout of the git repository, you can do so by running `bundle install && rake install`.
37
- As this is a source-based installation, you will need to have Rust installed, as described above.
33
+ If you're the sturdy type that likes to run from git:
34
+
35
+ bundle install
36
+ rake install
37
+
38
+ Or, if you've eschewed the convenience of Rubygems entirely, then you
39
+ presumably know what to do already.
38
40
 
39
41
 
40
42
  # Usage
data/enveloperb.gemspec CHANGED
@@ -7,7 +7,7 @@ end
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "enveloperb"
9
9
 
10
- s.version = ENV.fetch("GVB_VERSION_OVERRIDE") { GVB.version rescue "0.0.0.1.NOGVB" }
10
+ s.version = GVB.version rescue "0.0.0.1.NOGVB"
11
11
  s.date = GVB.date rescue Time.now.strftime("%Y-%m-%d")
12
12
 
13
13
  s.platform = Gem::Platform::RUBY
@@ -20,18 +20,19 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.files = `git ls-files -z`.split("\0").reject { |f| f =~ /^(\.|G|spec|Rakefile)/ }
22
22
 
23
- s.extensions = ["ext/enveloperb/extconf.rb"]
23
+ s.extensions = ["ext/Rakefile"]
24
+ s.require_paths = ["lib", "target"]
24
25
 
25
26
  s.required_ruby_version = ">= 2.7.0"
26
27
 
28
+ s.add_runtime_dependency "rutie", "~> 0.0.4"
29
+
27
30
  s.add_development_dependency 'bundler'
31
+ s.add_development_dependency 'gem-compiler'
28
32
  s.add_development_dependency 'github-release'
29
33
  s.add_development_dependency 'guard-rspec'
30
- s.add_development_dependency 'rake', '~> 13.0'
31
- s.add_development_dependency 'rake-compiler', '~> 1.2'
32
- s.add_development_dependency 'rake-compiler-dock', '~> 1.2'
34
+ s.add_development_dependency 'rake', '~> 10.4', '>= 10.4.2'
33
35
  s.add_development_dependency 'rb-inotify', '~> 0.9'
34
- s.add_development_dependency 'rb_sys', '~> 0.1'
35
36
  s.add_development_dependency 'redcarpet'
36
37
  s.add_development_dependency 'rspec'
37
38
  s.add_development_dependency 'simplecov'
data/ext/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ task :build do
2
+ sh "cargo build --release"
3
+ end
4
+
5
+ task default: :build
data/lib/enveloperb.rb CHANGED
@@ -1,15 +1,7 @@
1
- module Enveloperb
2
- end
1
+ require "rutie"
3
2
 
4
- begin
5
- RUBY_VERSION =~ /(\d+\.\d+)/
6
- require_relative "./#{$1}/enveloperb"
7
- rescue LoadError
8
- begin
9
- require_relative "./enveloperb.#{RbConfig::CONFIG["DLEXT"]}"
10
- rescue LoadError
11
- raise LoadError, "Failed to load enveloperb.#{RbConfig::CONFIG["DLEXT"]}; either it hasn't been built, or was built incorrectly for your system"
12
- end
3
+ module Enveloperb
4
+ Rutie.new(:enveloperb).init 'Init_enveloperb', __dir__
13
5
  end
14
6
 
15
7
  require_relative "./enveloperb/encrypted_record"
@@ -10,7 +10,7 @@ extern crate lazy_static;
10
10
  use aws_config;
11
11
  use aws_sdk_kms;
12
12
  use aws_types;
13
- use envelopers::{EncryptedRecord, EnvelopeCipher, KMSKeyProvider, SimpleKeyProvider};
13
+ use enveloper::{EncryptedRecord, EnvelopeCipher, KMSKeyProvider, SimpleKeyProvider};
14
14
  use std::borrow::Cow;
15
15
  use tokio::runtime::Runtime;
16
16
  use rutie::{Class, Encoding, Hash, Module, Object, RString, Symbol, VerifiedObject, VM};
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enveloperb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.1.ENOTAG
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Palmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-18 00:00:00.000000000 Z
11
+ date: 2022-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: rutie
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
19
+ version: 0.0.4
20
+ type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 0.0.4
27
27
  - !ruby/object:Gem::Dependency
28
- name: github-release
28
+ name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: guard-rspec
42
+ name: gem-compiler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,47 +53,53 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rake
56
+ name: github-release
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '13.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '13.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake-compiler
70
+ name: guard-rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '1.2'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '1.2'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rake-compiler-dock
84
+ name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.2'
89
+ version: '10.4'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 10.4.2
90
93
  type: :development
91
94
  prerelease: false
92
95
  version_requirements: !ruby/object:Gem::Requirement
93
96
  requirements:
94
97
  - - "~>"
95
98
  - !ruby/object:Gem::Version
96
- version: '1.2'
99
+ version: '10.4'
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 10.4.2
97
103
  - !ruby/object:Gem::Dependency
98
104
  name: rb-inotify
99
105
  requirement: !ruby/object:Gem::Requirement
@@ -108,20 +114,6 @@ dependencies:
108
114
  - - "~>"
109
115
  - !ruby/object:Gem::Version
110
116
  version: '0.9'
111
- - !ruby/object:Gem::Dependency
112
- name: rb_sys
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '0.1'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '0.1'
125
117
  - !ruby/object:Gem::Dependency
126
118
  name: redcarpet
127
119
  requirement: !ruby/object:Gem::Requirement
@@ -183,23 +175,21 @@ email:
183
175
  - matt@cipherstash.com
184
176
  executables: []
185
177
  extensions:
186
- - ext/enveloperb/extconf.rb
178
+ - ext/Rakefile
187
179
  extra_rdoc_files: []
188
180
  files:
189
181
  - CODE_OF_CONDUCT.md
190
182
  - CONTRIBUTING.md
191
- - LICENSE
183
+ - Cargo.toml
184
+ - LICENCE
192
185
  - README.md
193
186
  - enveloperb.gemspec
194
- - ext/enveloperb/.gitignore
195
- - ext/enveloperb/Cargo.lock
196
- - ext/enveloperb/Cargo.toml
197
- - ext/enveloperb/extconf.rb
198
- - ext/enveloperb/src/lib.rs
187
+ - ext/Rakefile
199
188
  - lib/enveloperb.rb
200
189
  - lib/enveloperb/awskms.rb
201
190
  - lib/enveloperb/encrypted_record.rb
202
191
  - lib/enveloperb/simple.rb
192
+ - src/lib.rs
203
193
  homepage: https://github.com/cipherstash/enveloperb
204
194
  licenses: []
205
195
  metadata: {}
@@ -207,6 +197,7 @@ post_install_message:
207
197
  rdoc_options: []
208
198
  require_paths:
209
199
  - lib
200
+ - target
210
201
  required_ruby_version: !ruby/object:Gem::Requirement
211
202
  requirements:
212
203
  - - ">="
@@ -214,9 +205,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
205
  version: 2.7.0
215
206
  required_rubygems_version: !ruby/object:Gem::Requirement
216
207
  requirements:
217
- - - ">"
208
+ - - ">="
218
209
  - !ruby/object:Gem::Version
219
- version: 1.3.1
210
+ version: '0'
220
211
  requirements: []
221
212
  rubygems_version: 3.1.6
222
213
  signing_key:
data/LICENSE DELETED
@@ -1,124 +0,0 @@
1
- CipherStash Client Library Licence Agreement
2
-
3
- 0. Background
4
-
5
- This licence sets out the terms on which you are permitted to use client side
6
- components of software provided by CipherStash to query encrypted databases
7
- (CipherStash Client Software).The operation of the CipherStash Client Software
8
- is dependent on encryption keys generated by server software operated or
9
- licensed by CipherStash.
10
-
11
- 1. Definitions
12
-
13
- 1.1 In these terms the following terms have the following meanings:
14
- (a) Authorised Purpose in relation to the CipherStash Source Code has the
15
- meaning given to it in clause 2.4;
16
- (b) CipherStash Source Code means human readable code of the CipherStash
17
- Client Software;
18
- (c) CipherStash Executable means the machine executable code of the
19
- CipherStash Client Software as made available by CipherStash from
20
- time to time;
21
- (d) CipherStash Client Software has the meaning given to it in the
22
- Background;
23
- (e) Licensed Query means a query on a database that:
24
- (i) uses an encryption key generated by a key server operated or
25
- licensed by CipherStash for all encryption of the content of that
26
- query or of results returned in response to that query (excluding
27
- encryption in the transport layer for communications between
28
- servers); and
29
- (ii) uses a valid token provided by CipherStash in the course of
30
- acquiring the key referred to in the previous paragraph;
31
- (f) Your Applications means applications that you create that rely on any
32
- part of the CipherStash Client Software in the course of their
33
- operation.
34
- 1.2 In these terms, unless the context requires otherwise, references to:
35
- (a) encryption includes decryption;
36
- (b) keys are references to data used for encryption, not data indicating a
37
- row in a database table.
38
-
39
- 2. Grant of Licence
40
-
41
- 2.1 This licence permits you to do the following in relation to the CipherStash
42
- Client Software:
43
- (a) use the CipherStash Executables in the course of developing and testing
44
- Your Applications;
45
- (b) deploy and use copies of the CipherStash Executables for the purpose of
46
- executing Licensed Queries, including as part of one or more of Your
47
- Applications; and
48
- (c) use the CipherStash Source Code solely for an Authorised Purpose.
49
- 2.2 Subject to clause 2.4(c), you must not make any modifications to the
50
- CipherStash Client Software.
51
- 2.3 This licence specifically excludes any use of any part of the CipherStash
52
- Client Software to execute any queries other than Licensed Queries on any
53
- database.
54
- 2.4 CipherStash makes the CipherStash Source Code available for the sole purpose
55
- of allowing third parties to verify the operation, integrity and security
56
- of the CipherStash Client Software (Authorised Purpose). This licence
57
- permits you to do the following solely for an Authorised Purpose:
58
- (a) download and review the CipherStash Source Code;
59
- (b) build executable versions of the CipherStash Source Code to verify
60
- correspondence between it and its associated CipherStash Executable;
61
- (c) make configuration changes to the CipherStash Source Code solely to the
62
- extent necessary to build a working executable version under paragraph
63
- (b).
64
-
65
- 3. Warranties and Liability
66
-
67
- 3.1 To the extent permitted by law, CipherStash excludes all warranties,
68
- guarantees and conditions that would otherwise be implied into this
69
- agreement by law. Where CipherStash is not able to exclude such a warranty,
70
- guarantee or condition, CipherStash limits, to the extent permitted by law,
71
- its liability for a breach of that warranty, guarantee or condition to one
72
- or more of the following at its option:
73
- (a) in the case of goods, any one or more of the following:
74
- (i) the replacement of the goods or the supply of equivalent goods;
75
- (ii) the repair of the goods;
76
- (iii) the payment of the cost of replacing the goods or of acquiring
77
- equivalent goods;
78
- (iv) the payment of the cost of having the goods repaired; and
79
- (b) in the case of services:
80
- (i) the supplying of the services again; or
81
- (ii) the payment of the cost of having the services supplied again.
82
- 3.2 CipherStash has no liability to any person arising under or in relation to
83
- this agreement (whether in tort, contract, equity or otherwise) for any
84
- loss in the nature of consequential or economic loss. In particular,
85
- CipherStash has no liability to any person for any: lost profits; loss of
86
- savings, income or revenue; revenue not meeting targets or certain levels;
87
- uptime or availability of internet connectivity or of the ability of third
88
- parties to access a website, loss of opportunity; or loss of or corruption
89
- of data. The exclusions in this clause 3.2 apply even in respect of loss or
90
- damage that was foreseeable or about which either or both of the parties
91
- were aware was likely to arise.
92
-
93
- 4. Dispute Resolution
94
-
95
- 4.1 Prior to commencing any action in any court or any action in any other form
96
- of judicial or quasi-judicial forum you must comply with the requirements
97
- of this clause 4.
98
- 4.2 Where you believe there is a dispute between you and CipherStash in respect
99
- of a matter the subject of this agreement you must notify CipherStash in
100
- writing of the nature of that dispute and for a period of 120 days
101
- following CipherStash’s receipt of that notification, make reasonable
102
- attempts to resolve that dispute with CipherStash.
103
-
104
- 5. General and Interpretation
105
-
106
- 5.1 Except where expressly set out to the contrary, nothing in this agreement
107
- grants the Customer any rights over any intellectual property rights
108
- (including copyright, patents, and rights to the registration of such
109
- rights) held by CipherStash at any time.
110
- 5.2 No provision of this agreement may be construed against a party because
111
- that party drafted that term.
112
- 5.3 A waiver of rights under this agreement can only occur in writing signed by
113
- the party granting the waiver. Except to the extent set out in the waiver,
114
- a waiver is only effective in relation to the specific facts and rights set
115
- out in it and does not operate to waive any other rights or to waive the
116
- same rights in respect of different facts or circumstances.
117
- 5.4 Where a part of this agreement is held by a court to be illegal or
118
- otherwise unenforceable, and the unenforceability of that part does not
119
- substantially alter the character of the bargain that would have been in
120
- existence between the parties had that part been enforceable, that part is
121
- severed and the balance of this agreement will continue unaffected.
122
- 5.5 This contract is governed by the laws in force in the State of New South
123
- Wales, Australia. Each party submits to the non-exclusive jurisdiction of
124
- the courts of that State.
@@ -1,4 +0,0 @@
1
- /target
2
- # Cargo.lock is deliberately *not* ignored; despite *technically* being a
3
- # library package, it is not a Rust library that is built into other projects,
4
- # but rather a standalone binary object that should be built reproducibly.