ed25519 1.2.4 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +10 -0
- data/LICENSE +1 -1
- data/README.md +28 -17
- data/ext/ed25519_ref10/extconf.rb +2 -2
- data/lib/ed25519/verify_key.rb +2 -1
- data/lib/ed25519/version.rb +1 -1
- data/lib/ed25519.rb +7 -7
- data/lib/ed25519_jruby.jar +0 -0
- metadata +16 -23
- data/.gitignore +0 -15
- data/.rspec +0 -5
- data/.rubocop.yml +0 -35
- data/.travis.yml +0 -26
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -12
- data/Rakefile +0 -27
- data/appveyor.yml +0 -21
- data/ed25519.gemspec +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96a5d740f6f97510c41aaffe8d105c085dfc32282e395ed0c668ac894c175777
|
4
|
+
data.tar.gz: a9f4f7aed3f41646754a35b2b03b770a5868cadbd543317354c2e5c864aca4ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c850d4a4748eed7db824e57fe9b7e86efe0738f184e5c7c667a06b4398ba70f1129cf11c3101ee09b33790f9d4a8e0873fd4cab61be033862cf65703420af7a9
|
7
|
+
data.tar.gz: 136b7ef426b473ca83f3c7bbd20643c2731bb927b1728649f92db3cb2dd360d2ce5d6ebc3bf7c966fceca4f0385684b38947518be49b4141c7f30e3b213f36fa
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## [1.3.0] (2022-01-16)
|
2
|
+
|
3
|
+
[1.3.0]: https://github.com/crypto-rb/ed25519/compare/v1.2.4...v1.3.0
|
4
|
+
|
5
|
+
- Bump rubocop dependencies. ([#30])
|
6
|
+
- Add support for Ruby 3 & JRuby 9.3.0. ([#31])
|
7
|
+
|
8
|
+
[#30]: https://github.com/crypto-rb/ed25519/pull/30
|
9
|
+
[#31]: https://github.com/crypto-rb/ed25519/pull/31
|
10
|
+
|
1
11
|
## [1.2.4] (2018-01-04)
|
2
12
|
|
3
13
|
[1.2.4]: https://github.com/crypto-rb/ed25519/compare/v1.2.3...v1.2.4
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,17 +1,13 @@
|
|
1
|
-
# ed25519.rb [![Latest Version][gem-shield]][gem-link] [![
|
1
|
+
# ed25519.rb [![Latest Version][gem-shield]][gem-link] [![CI Status][ci-image]][ci-link] [![Yard Docs][docs-image]][docs-link] [![License: MIT][license-image]][license-link]
|
2
2
|
|
3
3
|
[gem-shield]: https://badge.fury.io/rb/ed25519.svg
|
4
4
|
[gem-link]: https://rubygems.org/gems/ed25519
|
5
|
-
[
|
6
|
-
[
|
7
|
-
[appveyor-image]: https://ci.appveyor.com/api/projects/status/4s05bcae0mow85v1?svg=true
|
8
|
-
[appveyor-link]: https://ci.appveyor.com/project/tarcieri/ed25519
|
5
|
+
[ci-image]: https://github.com/RubyCrypto/ed25519/workflows/CI/badge.svg
|
6
|
+
[ci-link]: https://github.com/RubyCrypto/ed25519/actions?query=workflow%3ACI+branch%3Amaster
|
9
7
|
[docs-image]: https://img.shields.io/badge/yard-docs-blue.svg
|
10
|
-
[docs-link]: http://www.rubydoc.info/gems/ed25519/1.
|
8
|
+
[docs-link]: http://www.rubydoc.info/gems/ed25519/1.3.0
|
11
9
|
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
|
12
|
-
[license-link]: https://github.com/
|
13
|
-
[gitter-image]: https://badges.gitter.im/badge.svg
|
14
|
-
[gitter-link]: https://gitter.im/crypto-rb/Lobby
|
10
|
+
[license-link]: https://github.com/RubyCrypto/ed25519/blob/master/LICENSE
|
15
11
|
|
16
12
|
A Ruby binding to the Ed25519 elliptic curve public-key signature system
|
17
13
|
described in [RFC 8032].
|
@@ -27,7 +23,7 @@ Montgomery form of Curve25519.
|
|
27
23
|
|
28
24
|
[RFC 8032]: https://tools.ietf.org/html/rfc8032
|
29
25
|
[str4d/ed25519-java]: https://github.com/str4d/ed25519-java
|
30
|
-
[x25519 gem]: https://github.com/
|
26
|
+
[x25519 gem]: https://github.com/RubyCrypto/x25519
|
31
27
|
|
32
28
|
## What is Ed25519?
|
33
29
|
|
@@ -38,7 +34,7 @@ Ed25519 provides a 128-bit security level, that is to say, all known attacks
|
|
38
34
|
take at least 2^128 operations, providing the same security level as AES-128,
|
39
35
|
NIST P-256, and RSA-3072.
|
40
36
|
|
41
|
-
![Ed25519 Diagram](https://raw.
|
37
|
+
![Ed25519 Diagram](https://raw.githubusercontent.com/RubyCrypto/ed25519/master/ed25519.png)
|
42
38
|
|
43
39
|
Ed25519 has a number of unique properties that make it one of the best-in-class
|
44
40
|
digital signature algorithms:
|
@@ -62,12 +58,27 @@ You can read more on [Dan Bernstein's Ed25519 site](http://ed25519.cr.yp.to/).
|
|
62
58
|
|
63
59
|
[Schnorr signature]: https://en.wikipedia.org/wiki/Schnorr_signature
|
64
60
|
|
61
|
+
### Is it any good?
|
62
|
+
|
63
|
+
[Yes.](http://news.ycombinator.com/item?id=3067434)
|
64
|
+
|
65
|
+
## Help and Discussion
|
66
|
+
|
67
|
+
Have questions? Want to suggest a feature or change? Join a discussion group:
|
68
|
+
|
69
|
+
* [Crypto.rb Gitter]: web-based chat about Ruby crypto projects including **ed25519**.
|
70
|
+
* [Crypto.rb Google Group]: join via web or email ([crypto-rb+subscribe@googlegroups.com])
|
71
|
+
|
72
|
+
[Crypto.rb Gitter]: https://gitter.im/crypto-rb/Lobby
|
73
|
+
[Crypto.rb Google Group]: https://groups.google.com/forum/#!forum/crypto-rb
|
74
|
+
[crypto-rb+subscribe@googlegroups.com]: mailto:crypto-rb+subscribe@googlegroups.com?subject=subscribe
|
75
|
+
|
65
76
|
## Requirements
|
66
77
|
|
67
78
|
**ed25519.rb** is supported on and tested against the following platforms:
|
68
79
|
|
69
|
-
* MRI 2.
|
70
|
-
* JRuby
|
80
|
+
* MRI 2.4, 2.5, 2.6, 2.7, 3.0
|
81
|
+
* JRuby 9.2.19, 9.3.0
|
71
82
|
|
72
83
|
## Installation
|
73
84
|
|
@@ -150,21 +161,21 @@ Weaknesses in the random number source can potentially result in insecure keys.
|
|
150
161
|
|
151
162
|
## Contributing
|
152
163
|
|
153
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
164
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/RubyCrypto/ed25519.
|
154
165
|
This project is intended to be a safe, welcoming space for collaboration,
|
155
166
|
and contributors areexpected to adhere to the [Contributor Covenant](http://contributor-covenant.org)
|
156
167
|
code of conduct.
|
157
168
|
|
158
169
|
## License
|
159
170
|
|
160
|
-
Copyright (c) 2012-
|
171
|
+
Copyright (c) 2012-2021 Tony Arcieri. Distributed under the MIT License. See
|
161
172
|
[LICENSE] for further details.
|
162
173
|
|
163
|
-
[LICENSE]: https://github.com/
|
174
|
+
[LICENSE]: https://github.com/RubyCrypto/ed25519/blob/master/LICENSE
|
164
175
|
|
165
176
|
## Code of Conduct
|
166
177
|
|
167
178
|
Everyone interacting in the **ed25519.rb** project’s codebases, issue trackers, chat
|
168
179
|
rooms and mailing lists is expected to follow the [code of conduct].
|
169
180
|
|
170
|
-
[code of conduct]: https://github.com/
|
181
|
+
[code of conduct]: https://github.com/RubyCrypto/ed25519/blob/master/CODE_OF_CONDUCT.md
|
data/lib/ed25519/verify_key.rb
CHANGED
@@ -25,6 +25,7 @@ module Ed25519
|
|
25
25
|
end
|
26
26
|
|
27
27
|
return true if Ed25519.provider.verify(@key_bytes, signature, message)
|
28
|
+
|
28
29
|
raise VerifyError, "signature verification failed!"
|
29
30
|
end
|
30
31
|
|
@@ -38,7 +39,7 @@ module Ed25519
|
|
38
39
|
|
39
40
|
# Show hex representation of serialized coordinate in string inspection
|
40
41
|
def inspect
|
41
|
-
"#<#{self.class}:#{@key_bytes.
|
42
|
+
"#<#{self.class}:#{@key_bytes.unpack1('H*')}>"
|
42
43
|
end
|
43
44
|
end
|
44
45
|
end
|
data/lib/ed25519/version.rb
CHANGED
data/lib/ed25519.rb
CHANGED
@@ -5,7 +5,7 @@ require "ed25519/signing_key"
|
|
5
5
|
require "ed25519/verify_key"
|
6
6
|
|
7
7
|
# The Ed25519 digital signatre algorithm
|
8
|
-
# rubocop:disable
|
8
|
+
# rubocop:disable Layout/LineLength
|
9
9
|
module Ed25519
|
10
10
|
module_function
|
11
11
|
|
@@ -28,6 +28,7 @@ module Ed25519
|
|
28
28
|
|
29
29
|
# Select the Ed25519::Provider to use based on the current environment
|
30
30
|
if defined? JRUBY_VERSION
|
31
|
+
require "jruby"
|
31
32
|
require "ed25519_jruby"
|
32
33
|
self.provider = org.cryptorb.Ed25519Provider.createEd25519Module(JRuby.runtime)
|
33
34
|
else
|
@@ -39,34 +40,33 @@ module Ed25519
|
|
39
40
|
def validate_key_bytes(key_bytes)
|
40
41
|
raise TypeError, "expected String, got #{key_bytes.class}" unless key_bytes.is_a?(String)
|
41
42
|
return true if key_bytes.bytesize == KEY_SIZE
|
43
|
+
|
42
44
|
raise ArgumentError, "expected #{KEY_SIZE}-byte String, got #{key_bytes.bytesize}"
|
43
45
|
end
|
44
46
|
|
45
47
|
# Perform a self-test to ensure the selected provider is working
|
46
48
|
def self_test
|
47
49
|
signature_key = Ed25519::SigningKey.new("A" * 32)
|
48
|
-
raise SelfTestFailure, "failed to generate verify key correctly" unless signature_key.verify_key.to_bytes.
|
50
|
+
raise SelfTestFailure, "failed to generate verify key correctly" unless signature_key.verify_key.to_bytes.unpack1("H*") == "db995fe25169d141cab9bbba92baa01f9f2e1ece7df4cb2ac05190f37fcc1f9d"
|
49
51
|
|
50
52
|
message = "crypto libraries should self-test on boot"
|
51
53
|
signature = signature_key.sign(message)
|
52
|
-
raise SelfTestFailure, "failed to generate correct signature" unless signature.
|
54
|
+
raise SelfTestFailure, "failed to generate correct signature" unless signature.unpack1("H*") == "c62c12a3a6cbfa04800d4be81468ef8aecd152a6a26a81d91257baecef13ba209531fe905a843e833c8b71cee04400fa2af3a29fef1152ece470421848758d0a"
|
53
55
|
|
54
56
|
verify_key = signature_key.verify_key
|
55
57
|
raise SelfTestFailure, "failed to verify a valid signature" unless verify_key.verify(signature, message)
|
56
58
|
|
57
|
-
bad_signature = signature[0...63]
|
59
|
+
bad_signature = "#{signature[0...63]}X"
|
58
60
|
ex = nil
|
59
|
-
|
60
|
-
# rubocop:disable Lint/HandleExceptions
|
61
61
|
begin
|
62
62
|
verify_key.verify(bad_signature, message)
|
63
63
|
rescue Ed25519::VerifyError => ex
|
64
64
|
end
|
65
|
-
# rubocop:enable Lint/HandleExceptions
|
66
65
|
|
67
66
|
raise SelfTestFailure, "failed to detect an invalid signature" unless ex.is_a?(Ed25519::VerifyError)
|
68
67
|
end
|
69
68
|
end
|
69
|
+
# rubocop:enable Layout/LineLength
|
70
70
|
|
71
71
|
# Automatically run self-test when library loads
|
72
72
|
Ed25519.self_test
|
Binary file
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ed25519
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
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: '
|
26
|
+
version: '0'
|
27
27
|
description: A Ruby binding to the Ed25519 elliptic curve public-key signature system
|
28
28
|
described in RFC 8032.
|
29
29
|
email:
|
@@ -31,20 +31,13 @@ email:
|
|
31
31
|
executables: []
|
32
32
|
extensions:
|
33
33
|
- ext/ed25519_ref10/extconf.rb
|
34
|
-
extra_rdoc_files:
|
34
|
+
extra_rdoc_files:
|
35
|
+
- README.md
|
36
|
+
- ed25519.png
|
35
37
|
files:
|
36
|
-
- ".gitignore"
|
37
|
-
- ".rspec"
|
38
|
-
- ".rubocop.yml"
|
39
|
-
- ".travis.yml"
|
40
38
|
- CHANGES.md
|
41
|
-
- CODE_OF_CONDUCT.md
|
42
|
-
- Gemfile
|
43
39
|
- LICENSE
|
44
40
|
- README.md
|
45
|
-
- Rakefile
|
46
|
-
- appveyor.yml
|
47
|
-
- ed25519.gemspec
|
48
41
|
- ed25519.png
|
49
42
|
- ext/ed25519_jruby/LICENSE.txt
|
50
43
|
- ext/ed25519_jruby/README.md
|
@@ -110,11 +103,12 @@ files:
|
|
110
103
|
- lib/ed25519/signing_key.rb
|
111
104
|
- lib/ed25519/verify_key.rb
|
112
105
|
- lib/ed25519/version.rb
|
113
|
-
|
106
|
+
- lib/ed25519_jruby.jar
|
107
|
+
homepage: https://github.com/RubyCrypto/ed25519
|
114
108
|
licenses:
|
115
109
|
- MIT
|
116
110
|
metadata: {}
|
117
|
-
post_install_message:
|
111
|
+
post_install_message:
|
118
112
|
rdoc_options: []
|
119
113
|
require_paths:
|
120
114
|
- lib
|
@@ -122,16 +116,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
122
116
|
requirements:
|
123
117
|
- - ">="
|
124
118
|
- !ruby/object:Gem::Version
|
125
|
-
version: 2.
|
119
|
+
version: 2.4.0
|
126
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
121
|
requirements:
|
128
122
|
- - ">="
|
129
123
|
- !ruby/object:Gem::Version
|
130
124
|
version: '0'
|
131
125
|
requirements: []
|
132
|
-
|
133
|
-
|
134
|
-
signing_key:
|
126
|
+
rubygems_version: 3.2.15
|
127
|
+
signing_key:
|
135
128
|
specification_version: 4
|
136
129
|
summary: An efficient digital signature library providing the Ed25519 algorithm
|
137
130
|
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
AllCops:
|
2
|
-
TargetRubyVersion: 2.4
|
3
|
-
DisplayCopNames: true
|
4
|
-
|
5
|
-
#
|
6
|
-
# Style
|
7
|
-
#
|
8
|
-
|
9
|
-
Style/StringLiterals:
|
10
|
-
EnforcedStyle: double_quotes
|
11
|
-
|
12
|
-
#
|
13
|
-
# Metrics
|
14
|
-
#
|
15
|
-
|
16
|
-
Metrics/AbcSize:
|
17
|
-
Enabled: false
|
18
|
-
|
19
|
-
Metrics/CyclomaticComplexity:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
Metrics/PerceivedComplexity:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
Metrics/BlockLength:
|
26
|
-
Max: 100
|
27
|
-
|
28
|
-
Metrics/ClassLength:
|
29
|
-
Max: 100
|
30
|
-
|
31
|
-
Metrics/LineLength:
|
32
|
-
Max: 128
|
33
|
-
|
34
|
-
Metrics/MethodLength:
|
35
|
-
Max: 25
|
data/.travis.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
cache: bundler
|
3
|
-
|
4
|
-
before_install:
|
5
|
-
- gem update --system
|
6
|
-
- gem --version
|
7
|
-
- gem install bundler -v 1.16.1
|
8
|
-
- bundle --version
|
9
|
-
|
10
|
-
bundler_args: --without development
|
11
|
-
|
12
|
-
rvm:
|
13
|
-
- jruby-9.1.15.0
|
14
|
-
- 2
|
15
|
-
- 2.1
|
16
|
-
- 2.2
|
17
|
-
- 2.3.6
|
18
|
-
- 2.4.3
|
19
|
-
- 2.5.0
|
20
|
-
|
21
|
-
matrix:
|
22
|
-
fast_finish: true
|
23
|
-
|
24
|
-
branches:
|
25
|
-
only:
|
26
|
-
- master
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at bascule@gmail.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gemspec
|
6
|
-
|
7
|
-
group :development, :test do
|
8
|
-
gem "rake", require: false
|
9
|
-
gem "rake-compiler", "~> 1.0", require: false
|
10
|
-
gem "rspec", "~> 3.7", require: false
|
11
|
-
gem "rubocop", "0.50.0", require: false
|
12
|
-
end
|
data/Rakefile
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "bundler/gem_tasks"
|
4
|
-
|
5
|
-
require "rake/clean"
|
6
|
-
CLEAN.include("**/*.o", "**/*.so", "**/*.bundle", "*.jar", "pkg", "tmp")
|
7
|
-
|
8
|
-
if defined? JRUBY_VERSION
|
9
|
-
require "rake/javaextensiontask"
|
10
|
-
Rake::JavaExtensionTask.new("ed25519_jruby") do |ext|
|
11
|
-
ext.ext_dir = "ext/ed25519_jruby"
|
12
|
-
end
|
13
|
-
else
|
14
|
-
require "rake/extensiontask"
|
15
|
-
|
16
|
-
Rake::ExtensionTask.new("ed25519_ref10") do |ext|
|
17
|
-
ext.ext_dir = "ext/ed25519_ref10"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
require "rspec/core/rake_task"
|
22
|
-
RSpec::Core::RakeTask.new
|
23
|
-
|
24
|
-
require "rubocop/rake_task"
|
25
|
-
RuboCop::RakeTask.new
|
26
|
-
|
27
|
-
task default: %w[compile spec rubocop]
|
data/appveyor.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
branches:
|
2
|
-
only:
|
3
|
-
- master
|
4
|
-
|
5
|
-
environment:
|
6
|
-
PATH: C:\Ruby%RUBY_VERSION%\DevKit\mingw\bin;C:\Ruby%RUBY_VERSION%\bin;C:\Ruby%RUBY_VERSION%\DevKit\bin;%PATH%
|
7
|
-
matrix:
|
8
|
-
- RUBY_VERSION: "21-x64"
|
9
|
-
- RUBY_VERSION: "22-x64"
|
10
|
-
- RUBY_VERSION: "23-x64"
|
11
|
-
- RUBY_VERSION: "24-x64"
|
12
|
-
|
13
|
-
build: off
|
14
|
-
|
15
|
-
test_script:
|
16
|
-
- SET RAKEOPT=-rdevkit
|
17
|
-
- ruby -v
|
18
|
-
- gem -v
|
19
|
-
- bundle -v
|
20
|
-
- bundle
|
21
|
-
- bundle exec rake compile spec
|
data/ed25519.gemspec
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require File.expand_path("lib/ed25519/version", __dir__)
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "ed25519"
|
7
|
-
spec.version = Ed25519::VERSION
|
8
|
-
spec.authors = ["Tony Arcieri"]
|
9
|
-
spec.email = ["tony.arcieri@gmail.com"]
|
10
|
-
spec.summary = "An efficient digital signature library providing the Ed25519 algorithm"
|
11
|
-
spec.description = <<-DESCRIPTION.strip.gsub(/\s+/, " ")
|
12
|
-
A Ruby binding to the Ed25519 elliptic curve public-key signature system
|
13
|
-
described in RFC 8032.
|
14
|
-
DESCRIPTION
|
15
|
-
spec.homepage = "https://github.com/crypto-rb/ed25519"
|
16
|
-
spec.license = "MIT"
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
-
spec.bindir = "exe"
|
19
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
-
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
if defined? JRUBY_VERSION
|
23
|
-
spec.platform = "java"
|
24
|
-
spec.files << "lib/ed25519_jruby.jar"
|
25
|
-
else
|
26
|
-
spec.platform = Gem::Platform::RUBY
|
27
|
-
spec.extensions = ["ext/ed25519_ref10/extconf.rb"]
|
28
|
-
end
|
29
|
-
|
30
|
-
spec.required_ruby_version = ">= 2.0.0"
|
31
|
-
spec.add_development_dependency "bundler", "~> 1.16"
|
32
|
-
end
|