asherah 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfe124753aae400175a8cfb7c174b61c48deaa36f99e8eb7a78f2aadd65c7a76
4
- data.tar.gz: ce325e03fbdef5eefe8a7beb75d3b4674a8a540e4a99412be8dcf76c4e749a5a
3
+ metadata.gz: 9b01c42d984ec9ab0d2bb7f28e58fb1b3f534c46696a545004476d8f31f31841
4
+ data.tar.gz: bece06e7a7c1c9fd9c7ffe0880ec18b4fe236133af0fae47c5c62553f32c4af9
5
5
  SHA512:
6
- metadata.gz: d5b49fe5bd9d160bff6869d1f7e0fa432291ee3f9c44c233b3ba00de6b948b40c270cc351876f4a53537c59f33efcd0f1d2ddf217dd5594563b20a9bf3023508
7
- data.tar.gz: 209aeae029bf569eb7d30ae8854e72d20e1fc22a56b6ca7ac7319e4edc0de34318a3523f3b3e0785d59406b370c8b154cac5140fc921eaa7a08c6d217ce49c4b
6
+ metadata.gz: e6e509ba7fd6e7ceaddc37c1cb6a3d30d3aed1020faeadaa7ce782cdb0d2dda2632aef05dcca268f26230bb1c42dd21da660b6ec98f03b838f4d1653dc6fdd76
7
+ data.tar.gz: 49a54d850740147e8e19a2e0e0abb7c0b3a214ce446640a91006099926b8bea86b379ff2bd0b585cde500c01474383de30d53b18600883308dbf1eec2b2512ff
data/.rubocop.yml CHANGED
@@ -95,6 +95,9 @@ Style/Documentation:
95
95
  Style/DocumentationMethod:
96
96
  Enabled: false # YARD comments are optional
97
97
 
98
+ Style/EmptyClassDefinition:
99
+ Enabled: false
100
+
98
101
  # Additional cops for code quality
99
102
  Lint/UnusedMethodArgument:
100
103
  Enabled: true
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.8.1] - 2026-03-05
4
+
5
+ - Upgrade to use asherah-cobhan v0.5.1
6
+ - Fix buffer undersize from float truncation in estimate_buffer
7
+
8
+ ## [0.8.0] - 2026-03-04
9
+
10
+ - Upgrade to use asherah-cobhan v0.5.0
11
+ - Expose disable_zero_copy config option to disable zero-copy FFI input buffers
12
+
3
13
  ## [0.7.0] - 2025-08-15
4
14
 
5
15
  - Fix memory leak risks in buffer management
data/README.md CHANGED
@@ -69,6 +69,22 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
69
69
 
70
70
  For tests requiring secrets (AWS KMS, database credentials), copy `.env.secrets.example` to `.env.secrets` and fill in the required values. The `.env.secrets` file is already in `.gitignore` to prevent accidental commits.
71
71
 
72
+ ### Cross-Language Tests
73
+
74
+ Cross-language tests verify that data encrypted with the Go implementation can be decrypted with the Ruby implementation and vice versa.
75
+
76
+ **Prerequisites:**
77
+ - MySQL running locally
78
+ - Go 1.24+ installed
79
+
80
+ **Running the tests:**
81
+
82
+ ```bash
83
+ TEST_DB_PASSWORD=pass bin/cross-language-test.sh
84
+ ```
85
+
86
+ See `bin/cross-language-test.sh` for available environment variables and their defaults.
87
+
72
88
  To install this gem onto your local machine, run `rake install`.
73
89
 
74
90
  To release a new version, update the version number in `version.rb`, create and push a version tag:
@@ -1,5 +1,5 @@
1
- version: v0.4.35
2
- libasherah-arm64.so: fad23a38e68e126374075adf197f0f431720aea9852deebe5f62d9240c935a66
3
- libasherah-x64.so: 8c52fc000df2c02fb2d1430afc3cd68e997f47f04b60d61481f8c4b201958ef8
4
- libasherah-arm64.dylib: 315bc41c85177a2b0c97f32e0af8e2694f393928678cbe648fdd8c16b8fe062a
5
- libasherah-x64.dylib: 848d3635713373e0482223087f454ff8464e36e7695e0ed19f830737288adaa9
1
+ version: v0.5.1
2
+ libasherah-arm64.so: eb1cf59da6e7006ba8044fa9b4ec471f32576f7edb1169e30f059c5f8815c044
3
+ libasherah-x64.so: 16237a58335e86c510a20a0a6e9afa6502026e9f5fd374012db8ee9130f41eed
4
+ libasherah-arm64.dylib: 03260e6552b7eb17b7cbe0cb6c16486bc4d17a110c1dc8ab9293cc4b678a8b80
5
+ libasherah-x64.dylib: df7d71223bdfc23afc29a5bf72e0294b12d632b63f135e7ac4194ec8d69c3766
@@ -21,6 +21,7 @@ module Asherah
21
21
  # @attr [Integer] expire_after, The amount of time in seconds a key is considered valid
22
22
  # @attr [Integer] check_interval, The amount of time in seconds before cached keys are considered stale
23
23
  # @attr [Boolean] enable_session_caching, Enable shared session caching
24
+ # @attr [Boolean] disable_zero_copy, Disable zero-copy FFI input buffers to prevent use-after-free from caller runtime
24
25
  # @attr [Boolean] verbose, Enable verbose logging output
25
26
  class Config
26
27
  MAPPING = {
@@ -40,6 +41,7 @@ module Asherah
40
41
  session_cache_max_size: :SessionCacheMaxSize,
41
42
  session_cache_duration: :SessionCacheDuration,
42
43
  enable_session_caching: :EnableSessionCaching,
44
+ disable_zero_copy: :DisableZeroCopy,
43
45
  expire_after: :ExpireAfter,
44
46
  check_interval: :CheckInterval,
45
47
  verbose: :Verbose
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Asherah
4
- VERSION = '0.7.0'
4
+ VERSION = '0.8.1'
5
5
  end
data/lib/asherah.rb CHANGED
@@ -124,10 +124,12 @@ module Asherah
124
124
  private
125
125
 
126
126
  def estimate_buffer(data_bytesize, partition_bytesize)
127
+ est_data_len = (((data_bytesize + ESTIMATED_ENCRYPTION_OVERHEAD) * BASE64_OVERHEAD).to_i + 1)
128
+
127
129
  ESTIMATED_ENVELOPE_OVERHEAD +
128
130
  @intermediated_key_overhead_bytesize +
129
131
  partition_bytesize +
130
- ((data_bytesize + ESTIMATED_ENCRYPTION_OVERHEAD) * BASE64_OVERHEAD)
132
+ est_data_len
131
133
  end
132
134
  end
133
135
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asherah
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoDaddy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-08-15 00:00:00.000000000 Z
11
+ date: 2026-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cobhan