<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/openssl/test_bn.rb, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Sync ruby/openssl</title>
<updated>2025-06-06T02:11:38+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-06-06T02:11:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1dd8671c46c155920b141407ba442523758a7128'/>
<id>1dd8671c46c155920b141407ba442523758a7128</id>
<content type='text'>
Pick https://github.com/ruby/openssl/pull/896
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pick https://github.com/ruby/openssl/pull/896
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] test_bn.rb: AWS-LC does not support BN::CONSTTIME</title>
<updated>2025-02-22T15:11:37+00:00</updated>
<author>
<name>Samuel Chiang</name>
<email>sachiang@amazon.com</email>
</author>
<published>2025-02-12T01:13:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ee5af8860f15485745a8e37c19f28704e94be7bd'/>
<id>ee5af8860f15485745a8e37c19f28704e94be7bd</id>
<content type='text'>
AWS-LC does not support BN_FLG_CONSTTIME due to its historically
inconsistent constant-time guarantees.

https://github.com/ruby/openssl/commit/9875a01b5f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
AWS-LC does not support BN_FLG_CONSTTIME due to its historically
inconsistent constant-time guarantees.

https://github.com/ruby/openssl/commit/9875a01b5f
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] make bn shareable when frozen</title>
<updated>2024-11-13T07:25:51+00:00</updated>
<author>
<name>HoneyryderChuck</name>
<email>cardoso_tiago@hotmail.com</email>
</author>
<published>2024-10-19T16:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=233576843721a551fa276ba5c3cf19b38fa4ead1'/>
<id>233576843721a551fa276ba5c3cf19b38fa4ead1</id>
<content type='text'>
https://github.com/ruby/openssl/commit/d3c8e661e8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/openssl/commit/d3c8e661e8
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] Fix modular square root test with LibreSSL &gt;= 3.8</title>
<updated>2023-06-18T16:57:09+00:00</updated>
<author>
<name>Theo Buehler</name>
<email>tb@openbsd.org</email>
</author>
<published>2023-04-11T17:43:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bc0539a9b7538c5cb0c194cc0a700466cfa1b003'/>
<id>bc0539a9b7538c5cb0c194cc0a700466cfa1b003</id>
<content type='text'>
If x is a modular square root of a (mod p) then so is (p - x). Both
answers are valid. In particular, both 2 and 3 are valid square roots
of 4 (mod 5). Do not assume that a particular square root is chosen by
the algorithm. Indeed, the algorithm in OpenSSL and LibreSSL &lt;= 3.7
returns a non-deterministic answer in many cases. LibreSSL 3.8 and
later will always return the smaller of the two possible answers. This
breaks the current test case.

Instead of checking for a particular square root, check that the square
of the claimed square root is the given value. This is always true. Add
the simplest test case where the answer is indeed non-deterministic.

https://github.com/ruby/openssl/commit/93548ae959
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If x is a modular square root of a (mod p) then so is (p - x). Both
answers are valid. In particular, both 2 and 3 are valid square roots
of 4 (mod 5). Do not assume that a particular square root is chosen by
the algorithm. Indeed, the algorithm in OpenSSL and LibreSSL &lt;= 3.7
returns a non-deterministic answer in many cases. LibreSSL 3.8 and
later will always return the smaller of the two possible answers. This
breaks the current test case.

Instead of checking for a particular square root, check that the square
of the claimed square root is the given value. This is always true. Add
the simplest test case where the answer is indeed non-deterministic.

https://github.com/ruby/openssl/commit/93548ae959
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] add BN#mod_sqrt</title>
<updated>2022-10-17T14:38:34+00:00</updated>
<author>
<name>Ben Toews</name>
<email>benjamin.toews@gmail.com</email>
</author>
<published>2022-10-17T13:31:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=149cb049f1d7f5fd2edf5ab467c33037ec993a47'/>
<id>149cb049f1d7f5fd2edf5ab467c33037ec993a47</id>
<content type='text'>
https://github.com/ruby/openssl/commit/4619ab3e76
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/openssl/commit/4619ab3e76
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] Add tast cases to OpenSSL::BN using ractor</title>
<updated>2021-12-24T18:31:59+00:00</updated>
<author>
<name>Yusuke Nakamura</name>
<email>yusuke1994525@gmail.com</email>
</author>
<published>2021-12-21T08:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=44bfe72892a5a07040d806c2aee89ee52955d86d'/>
<id>44bfe72892a5a07040d806c2aee89ee52955d86d</id>
<content type='text'>
OpenSSL::BN has been make ractor-safed in 9e7cf9e ,
but there was no test.
And to use 'ractor' annotation, update test-unit to v3.4.6 or higher.

https://github.com/ruby/openssl/commit/7541a66911
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OpenSSL::BN has been make ractor-safed in 9e7cf9e ,
but there was no test.
And to use 'ractor' annotation, update test-unit to v3.4.6 or higher.

https://github.com/ruby/openssl/commit/7541a66911
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] bn: make BN.pseudo_rand{,_range} an alias of BN.rand{,_range}</title>
<updated>2021-10-24T15:40:48+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2021-03-20T15:20:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e19186707a78e6e739646dac1430dc3066cf9bad'/>
<id>e19186707a78e6e739646dac1430dc3066cf9bad</id>
<content type='text'>
BN_pseudo_rand() and BN_pseudo_rand_range() are deprecated in
OpenSSL 3.0. Since they are identical to their non-'pseudo' version
anyway, let's make them alias.

https://github.com/ruby/openssl/commit/2d34e85ddf
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BN_pseudo_rand() and BN_pseudo_rand_range() are deprecated in
OpenSSL 3.0. Since they are identical to their non-'pseudo' version
anyway, let's make them alias.

https://github.com/ruby/openssl/commit/2d34e85ddf
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] Add OpenSSL::BN#set_flags and #get_flags</title>
<updated>2021-07-18T08:45:02+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2021-02-16T09:21:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3d37e5d11cdf02ed433493126e195e194d4000dc'/>
<id>3d37e5d11cdf02ed433493126e195e194d4000dc</id>
<content type='text'>
Also, OpenSSL::BN::CONSTTIME is added.

OpenSSL itself had a feature that was vulnerable against a side-channel
attack. The OpenSSL authors determined that it was not a security issue,
and they have already fixed the issue by using BN_set_flags.

https://github.com/openssl/openssl/pull/13888

If a Ruby OpenSSL user was faced with a similar issue, they couldn't
prevent the issue because Ruby OpenSSL lacks a wrapper to BN_set_flags.
For the case, this change introduces the wrapper.

https://github.com/ruby/openssl/commit/1e565eba89
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, OpenSSL::BN::CONSTTIME is added.

OpenSSL itself had a feature that was vulnerable against a side-channel
attack. The OpenSSL authors determined that it was not a security issue,
and they have already fixed the issue by using BN_set_flags.

https://github.com/openssl/openssl/pull/13888

If a Ruby OpenSSL user was faced with a similar issue, they couldn't
prevent the issue because Ruby OpenSSL lacks a wrapper to BN_set_flags.
For the case, this change introduces the wrapper.

https://github.com/ruby/openssl/commit/1e565eba89
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] BN.abs and BN uplus</title>
<updated>2021-07-18T08:44:39+00:00</updated>
<author>
<name>Rick Mark</name>
<email>rick.mark@coinbase.com</email>
</author>
<published>2021-04-01T19:29:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=01fcb8f45b28d9b33e04c9b9873e47276faf5581'/>
<id>01fcb8f45b28d9b33e04c9b9873e47276faf5581</id>
<content type='text'>
Adds standard math abs fuction and revises uplus to return a duplicated object due to BN mutability

https://github.com/ruby/openssl/commit/0321b1e945
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds standard math abs fuction and revises uplus to return a duplicated object due to BN mutability

https://github.com/ruby/openssl/commit/0321b1e945
</pre>
</div>
</content>
</entry>
<entry>
<title>Defer to require prime for OpenSSL::TestBN</title>
<updated>2021-05-27T05:42:11+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2021-05-26T10:51:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b8dcad8d32a5405cbbf29f6705c8975f1773170a'/>
<id>b8dcad8d32a5405cbbf29f6705c8975f1773170a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
