elliptic_curve 0.1.0 → 0.1.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
  SHA1:
3
- metadata.gz: de1ce69b480667f278fcba941f9402e409243062
4
- data.tar.gz: 0a9101abc08811d0bdb1d4f404d812291e39a40b
3
+ metadata.gz: 7fdf2755e2f03cc6623c7647268b39129c98bfa2
4
+ data.tar.gz: 108fddf54a5bec531c59edf61c1f8e36561cfea8
5
5
  SHA512:
6
- metadata.gz: d6f0453333e00a582d4d63e192ed2175867ff267e9e41383880efa425a9ec976b6acf7bae68bf0fa1d05c2114c9e8c43a326a3dd4271669d34c40e4e50ff4797
7
- data.tar.gz: aab90bed91d58a7e2ca66e8725d1ded213dca089aa1cbf89eece6a2847e20b403b001a08f1b3f7c3b05408170602d7955aebe717b041607a90952984730dbefa
6
+ metadata.gz: a1e2dca08a4adb58a31c16ed61083a24bfc176e71a2fb5e87aedbb04e8a455f3469ca5497db971108416c968994f49bd80b5b1655a475d7777fe916fec6b5994
7
+ data.tar.gz: 31a9813ca2b05350f4a1e25583add234b2da74ee0862c714f9a8a6f589420e1b99fa4d89035056af44f2d2cd9bbb796bb1ec46c3caff39521d1c42c17e7bbaaa
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /*gem
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # EllipticCurve
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/elliptic_curve`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Just the bare implementation for doing some exercises with elliptic curves. See below for usage.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,13 +20,35 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ You can define elliptic curves using the EllitpicCurve::EC-class:
24
+
25
+ ```
26
+ ec = EllipticCurve::EC.new( 1, 2, 11 )
27
+ ```
26
28
 
27
- ## Development
29
+ which would create an elliptic curve in F_11 of the following form:
30
+
31
+ ```
32
+ y^2 = x^3 + 1 * x + 2
33
+ ```
28
34
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
35
+ Then you can define a point on this curve:
30
36
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
37
+ ```
38
+ p = EllitpicCurve::P( ec, 4, 2 )
39
+ ```
40
+
41
+ And do some calculations:
42
+
43
+ ```
44
+ psum = p + p
45
+ psum2 = psum + p
46
+ if psum2 == p * 3
47
+ puts "is equal, x-axis is: #{psum2.x}"
48
+ else
49
+ puts 'some error'
50
+ end
51
+ ```
32
52
 
33
53
  ## Contributing
34
54
 
@@ -13,7 +13,8 @@ Gem::Specification.new do |spec|
13
13
  elliptic curves. }
14
14
  spec.description = %q{This gives the basic for representing elliptic curves of the form
15
15
  y^2 = x^3 + ax + b, including adding and (p^-1 modulo q).}
16
- spec.homepage = "http://github.com/ineiti/elliptic_curve"
16
+ spec.homepage = 'http://github.com/ineiti/elliptic_curve'
17
+ spec.license = 'GPL-3.0'
17
18
 
18
19
 
19
20
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -1,3 +1,3 @@
1
1
  module EllipticCurve
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elliptic_curve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linus Gasser
@@ -62,7 +62,8 @@ files:
62
62
  - lib/elliptic_curve.rb
63
63
  - lib/elliptic_curve/version.rb
64
64
  homepage: http://github.com/ineiti/elliptic_curve
65
- licenses: []
65
+ licenses:
66
+ - GPL-3.0
66
67
  metadata: {}
67
68
  post_install_message:
68
69
  rdoc_options: []