Skip to content

Commit

Permalink
lib: update gem version to 1.3.3 (#31)
Browse files Browse the repository at this point in the history
* lib: update gem version to 1.3.3

* docs: remove historical warnings from readme
  • Loading branch information
q9f authored Dec 30, 2024
1 parent 0f70900 commit ddec583
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The Keccak (SHA3) digest for Ruby
# The Keccak (SHA3 candidate) digest for Ruby

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/q9f/keccak.rb/build.yml?branch=main)](https://github.com/q9f/keccak.rb/actions)
[![GitHub top language](https://img.shields.io/github/languages/top/q9f/keccak.rb?color=black)](https://github.com/q9f/keccak.rb/pulse)
Expand All @@ -8,9 +8,7 @@
[![Visitors](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fq9f%2Fkeccak.rb&count_bg=%2379C83D&title_bg=%23555555&icon=rubygems.svg&icon_color=%23FF0000&title=visitors&edge_flat=false)](https://hits.seeyoufarm.com)
[![License](https://img.shields.io/github/license/q9f/keccak.rb.svg?color=black)](LICENSE)

This Ruby extension exposes the [Keccak](http://keccak.noekeon.org/) (SHA3) digest `C` bindings in the non-final version used by [Ethereum](https://ethereum.org). It is based on the reference `C` implementation, version 3.2. The exposed interface is almost identical to that of the `digest` standard library. See [#16](https://github.com/q9f/keccak.rb/pull/16).

:warning: **Note: version `~> 1.3` exposes `digest/keccak` (`Digest::Keccak`) whereas version `~> 1.2` maintains the old `digest/sha3` (`Digest::SHA3`) for backward compatibility.** Only use `~> 1.2` if you want to lazy-patch your library. It works, but it's _not recommended._ Use `~> 1.3` and simply rename SHA3 to Keccak.
This Ruby extension exposes the [Keccak](http://keccak.noekeon.org/) (SHA3 candidate) digest `C` bindings in the non-final version used by [Ethereum](https://ethereum.org). It is based on the reference `C` implementation, version 3.2. The exposed interface is almost identical to that of the `digest` standard library. See [#16](https://github.com/q9f/keccak.rb/pull/16).

## Installation

Expand All @@ -25,8 +23,6 @@ gem install keccak
gem 'keccak', '~> 1.3'
```

**Note**: as of version `~> v1.1`, `digest-sha3` (historic name, see below) requires Ruby 2.2. The new `keccak` version `~> v1.2` now also supports Ruby 3.0. The last version that worked on older Ruby (1.x) versions was `~> v1.0`. It can be found at the no longer maintained `digest-sha3` [repository from 2015](https://github.com/phusion/digest-sha3-ruby/releases/tag/release-1.0.2).

## Usage

This gem extends the `digest/*` module by a `digest/keccak` class.
Expand Down Expand Up @@ -69,8 +65,6 @@ A part of the test suite is automatically generated from Keccak's reference test

## Warning: Keccak vs. SHA3

**Note:** This gem still uses the `Digest::SHA3` namespace in version `~> 1.2` for reasons of backward compatibility and long-term maintainability. See history section below.

:warning: This gem does **not** implement the final FIPS202 standard, today known as SHA3 but rather an early version, commonly referred to as Keccak. The reason why this is kept around, is that Ethereum uses this earler version of Keccak. See also: [Ethereum: Difference between keccak256 and sha3](https://ethereum.stackexchange.com/questions/30369/difference-between-keccak256-and-sha3).

If you are looking for the final SHA3 gem, please use the following: https://rubygems.org/gems/sha3
Expand Down
2 changes: 1 addition & 1 deletion lib/digest/keccak/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Digest
class Keccak
VERSION = "1.3.2"
VERSION = "1.3.3"
end
end

0 comments on commit ddec583

Please sign in to comment.