Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package bouncycastle.16608 for 
openSUSE:Leap:15.2:Update checked in at 2021-06-29 06:06:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2:Update/bouncycastle.16608 (Old)
 and      /work/SRC/openSUSE:Leap:15.2:Update/.bouncycastle.16608.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bouncycastle.16608"

Tue Jun 29 06:06:30 2021 rev:1 rq:902447 version:1.64

Changes:
--------
New Changes file:

--- /dev/null   2021-06-17 12:39:55.005330521 +0200
+++ 
/work/SRC/openSUSE:Leap:15.2:Update/.bouncycastle.16608.new.2625/bouncycastle.changes
       2021-06-29 06:06:30.473674880 +0200
@@ -0,0 +1,329 @@
+-------------------------------------------------------------------
+Fri May 21 11:39:44 UTC 2021 - Pedro Monreal <pmonr...@suse.com>
+
+- Security fix: [bsc#1186328, CVE-2020-15522]
+  * Fixes a timing issue within the EC math library
+  * Blind the inversion when normalizing
+- Add bouncycastle-CVE-2020-15522.patch
+
+-------------------------------------------------------------------
+Wed Nov  6 18:11:54 UTC 2019 - Pedro Monreal Gonzalez 
<pmonrealgonza...@suse.com>
+
+- Fix arch dependent macros in noarch package [bsc#1109539]
+
+-------------------------------------------------------------------
+Sat Oct 12 17:27:09 UTC 2019 - Pedro Monreal Gonzalez 
<pmonrealgonza...@suse.com>
+
+- Update pom files with those from Maven repository.
+
+-------------------------------------------------------------------
+Thu Oct 10 16:29:27 UTC 2019 - Pedro Monreal Gonzalez 
<pmonrealgonza...@suse.com>
+
+- Version update to 1.64 [bsc#1153385, CVE-2019-17359]
+  [bsc#1096291, CVE-2018-1000180][bsc#1100694, CVE-2018-1000613]
+  * Security Advisory:
+    - CVE-2019-17359: A change to the ASN.1 parser in 1.63 introduced
+      a regression that can cause an OutOfMemoryError to occur on
+      parsing ASN.1 data.
+  * Defects Fixed:
+    - OpenSSH: Fixed padding in generated Ed25519 private keys.
+    - GOST3410-2012-512 now uses the GOST3411-2012-256 as its KDF digest.
+    - Validation of headers in PemReader now looks for tailing dashes in 
header.
+    - Some compatibility issues around the signature encryption algorithm
+      field in CMS SignedData and the GOST algorithms have been addressed.
+  * Additional Features and Functionality:
+    - PKCS12 key stores containing only certificates can now be created
+      without the need to provide passwords.
+    - BCJSSE: Initial support for AlgorithmConstraints; protocol versions
+      and cipher suites.
+    - BCJSSE: Initial support for 'jdk.tls.disabledAlgorithms'; protocol
+      versions and cipher suites.
+    - BCJSSE: Add SecurityManager check to access session context.
+    - BCJSSE: Improved SunJSSE compatibility of the NULL_SESSION.
+    - BCJSSE: SSLContext algorithms updated for SunJSSE compatibility
+             (default enabled protocols).
+    - The digest functions Haraka-256 and Haraka-512 have been added to
+      the provider and the light-weight API
+    - XMSS/XMSS^MT key management now allows for allocating subsets of the
+      private key space using the extraKeyShard() method. Use of
+      StateAwareSignature is now deprecated.
+    - Support for Java 11's NamedParameterSpec class has been added
+      (using reflection) to the EC and EdEC KeyPairGenerator implementations.
+
+-------------------------------------------------------------------
+Thu Oct 10 16:22:11 UTC 2019 - Pedro Monreal Gonzalez 
<pmonrealgonza...@suse.com>
+
+- Version update to 1.63
+  * Defects Fixed:
+    - The ASN.1 parser would throw a large object exception for some objects
+      which could be safely parsed.
+    - GOST3412-2015 CTR mode was unusable at the JCE level.
+    - The DSTU MACs were failing to reset fully on doFinal().
+    - The DSTU MACs would throw an exception if the key was a multiple of the
+      size as the MAC's underlying buffer size.
+    - EdEC and QTESLA were not previously usable with the post Java 9 module 
structure.
+    - ECNR was not correctly bounds checking the input and could produce 
invalid signatures.
+    - ASN.1: Enforce no leading zeroes in OID branches (longer than 1 
character).
+    - TLS: Fix X448 support in JcaTlsCrypto.
+    - Fixed field reduction for secp128r1 custom curve.
+    - Fixed unsigned multiplications in X448 field squaring.
+    - Some issues over subset Name Constraint validation in the CertPath 
analyser
+    - TimeStampResponse.getEncoded() could throw an exception if the 
TimeStampToken was null.
+    - Unnecessary memory usage in the ARGON2 implementation has been removed.
+    - Param-Z in the GOST-28147 algorithm was not resolving correctly.
+    - It is now possible to specify different S-Box parameters for the GOST 
28147-89 MAC.
+  * Additional Features and Functionality:
+    - QTESLA is now updated with the round 2 changes. Note: the security 
catergories,
+      and in some cases key generation and signatures, have changed. The round 
1 version is
+      now moved to org.bouncycastle.pqc.crypto.qteslarnd1, this package will 
be deleted in
+      1.64. Please keep in mind that QTESLA may continue to evolve.
+    - Support has been added for generating Ed25519/Ed448 signed certificates.
+    - A method for recovering the message/digest value from an ECNR signature 
has been added.
+    - Support for the ZUC-128 and ZUC-256 ciphers and MACs has been added to 
the provider
+      and the lightweight API.
+    - Support has been added for ChaCha20-Poly1305 AEAD mode from RFC 7539.
+    - Improved performance for multiple ECDSA verifications using same public 
key.
+    - Support for PBKDF2withHmacSM3 has been added to the BC provider.
+    - The S/MIME API has been fixed to avoid unnecessary delays due to DNS 
resolution of a
+      hosts name in internal MimeMessage preparation.
+    - The valid path for EST services has been updated to cope with the 
characters used in
+      the Aruba clearpass EST implementation.
+
+- Version update to 1.62
+  * Defects Fixed:
+    - DTLS: Fixed infinite loop on IO exceptions.
+    - DTLS: Retransmission timers now properly apply to flights monolithically.
+    - BCJSSE: setEnabledCipherSuites ignores unsupported cipher suites.
+    - BCJSSE: SSLSocket implementations store passed-in 'host' before 
connecting.
+    - BCJSSE: Handle SSLEngine closure prior to handshake.
+    - BCJSSE: Provider now configurable using security config under Java 11 
and later.
+    - EdDSA verifiers now reject overly long signatures.
+    - XMSS/XMSS^MT OIDs now using the values defined in RFC 8391.
+    - XMSS/XMSS^MT keys now encoded with OID at start.
+    - An error causing valid paths to be rejected due to DN based name 
constraints
+      has been fixed in the CertPath API.
+    - Name constraint resolution now includes special handling of serial 
numbers.
+    - Cipher implementations now handle ByteBuffer usage where the ByteBuffer 
has
+      no backing array.
+    - CertificateFactory now enforces presence of PEM headers when required.
+    - A performance issue with RSA key pair generation that was introduced in 
1.61
+      has been mostly eliminated.
+  * Additional Features and Functionality:
+    - Builders for X509 certificates and CRLs now support replace and remove 
extension methods.
+    - DTLS: Added server-side support for HelloVerifyRequest.
+    - DTLS: Added support for an overall handshake timeout.
+    - DTLS: Added support for the heartbeat extension (RFC 6520).
+    - DTLS: Improve record seq. behaviour in HelloVerifyRequest scenarios.
+    - TLS: BasicTlsPSKIdentity now reusable (returns cloned array from getPSK).
+    - BCJSSE: Improved ALPN support, including selectors from Java 9.
+    - Lightweight RSADigestSigner now support use of NullDigest.
+    - SM2Engine now supports C1C3C2 mode.
+    - SHA256withSM2 now added to provider.
+    - BCJSSE: Added support for ALPN selectors (including in BC extension API 
for earlier JDKs).
+    - BCJSSE: Support 'SSL' algorithm for SSLContext (alias for 'TLS').
+    - The BLAKE2xs XOF has been added to the lightweight API.
+    - Utility classes added to support journaling of SecureRandom and 
algorithms to allow
+      persistance and later resumption.
+    - PGP SexprParser now handles some unprotected key types.
+    - NONEwithRSA support added to lightweight RSADigestSigner.
+    - Support for the Ethereum flavor of IES has been added to the lightweight 
API.
+
+- Version update to 1.61
+  * Defects Fixed:
+    - Use of EC named curves could be lost if keys were constructed.
+      via a key factory and algorithm parameters.
+    - RFC3211WrapEngine would not properly handle messages longer than 127 
bytes.
+    - The JCE implementations for RFC3211 would not return null 
AlgorithmParameters.
+    - TLS: Don't check CCS status for hello_request.
+    - TLS: Tolerate unrecognized hash algorithms.
+    - TLS: Tolerate unrecognized SNI types.
+    - Incompatibility issue in ECIES-KEM encryption in cofactor fixed.
+    - Issue with XMSS/XMSSMT private key loading which could result in invalid 
signatures fixed.
+    - StateAwareSignature.isSigningCapable() now returns false when the
+      key has reached it's maximum number of signatures.
+    - The McEliece KeyPairGenerator was failing to initialize the underlying
+      class if a SecureRandom was explicitly passed.
+    - The McEliece cipher would sometimes report the wrong value on a call
+      to Cipher.getOutputSize(int).
+    - CSHAKEDigest.leftEncode() was using the wrong endianness for multi byte 
values.
+    - Some ciphers, such as CAST6, were missing AlgorithmParameters 
implementations.
+    - An issue with the default "m" parameter for 1024 bit Diffie-Hellman keys 
which
+      could result in an exception on key pair generation has been fixed.
+    - The SPHINCS256 implementation is now more tolerant of parameters wrapped 
with a
+      SecureRandom and will not throw an exception if it receives one.
+    - A regression in PGPUtil.writeFileToLiteralData() which could cause 
corrupted
+      literal data has been fixed.
+    - Several parsing issues related to the processing of CMP 
PKIPublicationInfo.
+    - The ECGOST curves for id-tc26-gost-3410-12-256-paramSetA and
+      id-tc26-gost-3410-12-512-paramSetC had incorrect co-factors.
+  * Additional Features and Functionality:
+    - The qTESLA signature algorithm has been added to PQC light-weight API 
and the PQC provider.
+    - The password hashing function, Argon2 has been added to the lightweight 
API.
+    - BCJSSE: Added support for endpoint ID validation (HTTPS, LDAP, LDAPS).
+    - BCJSSE: Added support for 'useCipherSuitesOrder' parameter.
+    - BCJSSE: Added support for ALPN.
+    - BCJSSE: Various changes for improved compatibility with SunJSSE.
+    - BCJSSE: Provide default extended key/trust managers.
+    - TLS: Added support for TLS 1.2 features from RFC 8446.
+    - TLS: Removed support for EC point compression.
+    - TLS: Removed support for record compression.
+    - TLS: Updated to RFC 7627 from draft-ietf-tls-session-hash-04.
+    - TLS: Improved certificate sig. alg. checks.
+    - TLS: Finalised support for RFC 8442 cipher suites.
+    - Support has been added to the main Provider for the Ed25519 and Ed448 
signature algorithms.
+    - Support has been added to the main Provider for the X25519 and X448 key 
agreement algorithms.
+    - Utility classes have been added for handling OpenSSH keys.
+    - Support for processing messages built using GPG and Curve25519 has been 
added to the OpenPGP API.
+    - The provider now recognises the standard SM3 OID.
+    - A new API for directly parsing and creating S/MIME documents has been 
added to the PKIX API.
+    - SM2 in public key cipher mode has been added to the provider API.
+    - The BCFKSLoadStoreParameter has been extended to allow the use of 
certificates and digital
+      signatures for verifying the integrity of BCFKS key stores.
+
+-------------------------------------------------------------------
+Tue Sep 24 14:35:32 UTC 2019 - Fridrich Strba <fst...@suse.com>
+
+- Package also the bcpkix bcpg bcmail bctls artifacts in separate
+  sub-packages
+- Revert to building with source/target 6, since it is still
+  possible
+- Added patch:
+  * bouncycastle-javadoc.patch
+    + fix javadoc build
+
+-------------------------------------------------------------------
+Thu Jul 19 10:24:12 UTC 2018 - tchva...@suse.com
+
+- Version update to 1.60 bsc#1100694:
++++ 132 more lines (skipped)
++++ between /dev/null
++++ and 
/work/SRC/openSUSE:Leap:15.2:Update/.bouncycastle.16608.new.2625/bouncycastle.changes

New:
----
  bcmail-jdk15on-1.64.pom
  bcpg-jdk15on-1.64.pom
  bcpkix-jdk15on-1.64.pom
  bcprov-jdk15on-1.64.pom
  bctls-jdk15on-1.64.pom
  bouncycastle-CVE-2020-15522.patch
  bouncycastle-javadoc.patch
  bouncycastle.changes
  bouncycastle.spec
  r1rv64.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bouncycastle.spec ++++++
#
# spec file for package bouncycastle
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%global ver  1.64
%global shortver 164
%global gittag r1rv64
%global archivever jdk15on-%{shortver}b07
%global classname org.bouncycastle.jce.provider.BouncyCastleProvider
Name:           bouncycastle
Version:        %{ver}
Release:        0
Summary:        Bouncy Castle Cryptography APIs for Java
License:        MIT AND Apache-2.0
Group:          Development/Libraries/Java
URL:            https://www.bouncycastle.org
Source0:        https://github.com/bcgit/bc-java/archive/%{gittag}.tar.gz
# POMs from Maven Central
Source1:        
https://repo1.maven.org/maven2/org/%{name}/bcprov-jdk15on/%{version}/bcprov-jdk15on-%{version}.pom
Source2:        
https://repo1.maven.org/maven2/org/%{name}/bcpkix-jdk15on/%{version}/bcpkix-jdk15on-%{version}.pom
Source3:        
https://repo1.maven.org/maven2/org/%{name}/bcpg-jdk15on/%{version}/bcpg-jdk15on-%{version}.pom
Source4:        
https://repo1.maven.org/maven2/org/%{name}/bcmail-jdk15on/%{version}/bcmail-jdk15on-%{version}.pom
Source5:        
https://repo1.maven.org/maven2/org/%{name}/bctls-jdk15on/%{version}/bctls-jdk15on-%{version}.pom
Patch0:         bouncycastle-javadoc.patch
# PATCH-FIX-UPSTREAM bsc#1186328 CVE-2020-15522 Timing issue within the EC math 
library
Patch1:         bouncycastle-CVE-2020-15522.patch
BuildRequires:  ant
BuildRequires:  ant-junit
BuildRequires:  fdupes
BuildRequires:  javamail
BuildRequires:  javapackages-local
Requires(post): javapackages-tools
Requires(postun): javapackages-tools
Provides:       bcprov = %{version}-%{release}
BuildArch:      noarch

%description
The Bouncy Castle Crypto package is a Java implementation of cryptographic
algorithms. This jar contains JCE provider and lightweight API for the
Bouncy Castle Cryptography APIs for JDK 1.5 to JDK 1.8.

%package pkix
Summary:        Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF 
APIs
License:        MIT
Group:          Development/Libraries/Java
Requires:       %{name} = %{version}

%description pkix
The Bouncy Castle Java APIs for CMS, PKCS, EAC, TSP, CMP, CRMF, OCSP, and
certificate generation. This jar contains APIs for JDK 1.5 to JDK 1.8. The
APIs can be used in conjunction with a JCE/JCA provider such as the one
provided with the Bouncy Castle Cryptography APIs.

%package pg
Summary:        Bouncy Castle OpenPGP API
License:        MIT AND Apache-2.0
Group:          Development/Libraries/Java
Requires:       %{name} = %{version}

%description pg
The Bouncy Castle Java API for handling the OpenPGP protocol. This jar
contains the OpenPGP API for JDK 1.5 to JDK 1.8. The APIs can be used in
conjunction with a JCE/JCA provider such as the one provided with the
Bouncy Castle Cryptography APIs.

%package mail
Summary:        Bouncy Castle S/MIME API
License:        MIT
Group:          Development/Libraries/Java
Requires:       %{name} = %{version}
Requires:       %{name}-pkix = %{version}

%description mail
The Bouncy Castle Java S/MIME APIs for handling S/MIME protocols. This jar
contains S/MIME APIs for JDK 1.5 to JDK 1.8. The APIs can be used in
conjunction with a JCE/JCA provider such as the one provided with the Bouncy
Castle Cryptography APIs. The JavaMail API and the Java activation framework
will also be needed.

%package tls
Summary:        Bouncy Castle JSSE provider and TLS/DTLS API
License:        MIT
Group:          Development/Libraries/Java
Requires:       %{name} = %{version}

%description tls
The Bouncy Castle Java APIs for TLS and DTLS, including a provider for the
JSSE.

%package javadoc
Summary:        Javadoc for %{name}
License:        MIT
Group:          Development/Libraries/Java

%description javadoc
API documentation for the Bouncy Castle Cryptography APIs.

%prep
%setup -q -n bc-java-%{gittag}
%patch0 -p1
%patch1 -p1

# Remove provided binaries
find . -type f -name "*.class" -exec rm -f {} \;
find . -type f -name "*.jar" -exec rm -f {} \;

%build
ant -f ant/jdk15+.xml \
  -Dbc.javac.source=6 -Dbc.javac.target=6 \
  -Djunit.jar.home=$(build-classpath junit) \
  -Dmail.jar.home=$(build-classpath javax.mail) \
  -Dactivation.jar.home= \
  -Drelease.debug=true \
  clean build-provider build

# Not shipping the "lcrypto" jar, so don't ship the javadoc for it
rm -rf build/artifacts/jdk1.5/javadoc/lcrypto

%install
install -dm 755 %{buildroot}%{_sysconfdir}/java/security/security.d
touch %{buildroot}%{_sysconfdir}/java/security/security.d/2000-%{classname}

install -dm 0755 %{buildroot}%{_javadir}
install -dm 0755 %{buildroot}%{_mavenpomdir}
for bc in bcprov bcpkix bcpg bcmail bctls ; do
  install -pm 0644 build/artifacts/jdk1.5/jars/$bc-%{archivever}.jar 
%{buildroot}%{_javadir}/$bc.jar
  install -pm 0644 %{_sourcedir}/$bc-jdk15on-%{version}.pom 
%{buildroot}%{_mavenpomdir}/$bc.pom
  %add_maven_depmap $bc.pom $bc.jar -a 
"org.bouncycastle:$bc-jdk16,org.bouncycastle:$bc-jdk15" -f $bc
done

install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -r build/artifacts/jdk1.5/javadoc/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}

%post
{
  # Rebuild the list of security providers in classpath.security
  suffix=security/classpath.security
  secfiles="%{_prefix}/lib/$suffix %{_prefix}/lib64/$suffix"

  for secfile in $secfiles
  do
    # check if this classpath.security file exists
    [ -f "$secfile" ] || continue

    sed -i '/^security\.provider\./d' "$secfile"

    count=0
    for provider in $(ls %{_sysconfdir}/java/security/security.d)
    do
      count=$((count + 1))
      echo "security.provider.${count}=${provider#*-}" >> "$secfile"
    done
  done
} || :

%postun
if [ $1 -eq 0 ] ; then

  {
    # Rebuild the list of security providers in classpath.security
    suffix=security/classpath.security
    secfiles="%{_prefix}/lib/$suffix %{_prefix}/lib64/$suffix"

    for secfile in $secfiles
    do
      # check if this classpath.security file exists
      [ -f "$secfile" ] || continue

      sed -i '/^security\.provider\./d' "$secfile"

      count=0
      for provider in $(ls %{_sysconfdir}/java/security/security.d)
      do
        count=$((count + 1))
        echo "security.provider.${count}=${provider#*-}" >> "$secfile"
      done
    done
  } || :

fi

%files -f .mfiles-bcprov
%license build/artifacts/jdk1.5/bcprov-jdk15on-*/LICENSE.html
%doc docs/ core/docs/ *.html
%config(noreplace) %{_sysconfdir}/java/security/security.d/2000-%{classname}

%files pkix -f .mfiles-bcpkix
%license build/artifacts/jdk1.5/bcpkix-jdk15on-*/LICENSE.html

%files pg -f .mfiles-bcpg
%license build/artifacts/jdk1.5/bcpg-jdk15on-*/LICENSE.html

%files mail -f .mfiles-bcmail
%license build/artifacts/jdk1.5/bcmail-jdk15on-*/LICENSE.html

%files tls -f .mfiles-bctls
%license build/artifacts/jdk1.5/bctls-jdk15on-*/LICENSE.html

%files javadoc
%{_javadocdir}/%{name}
%license LICENSE.html

%changelog
++++++ bcmail-jdk15on-1.64.pom ++++++
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
        
    <modelVersion>4.0.0</modelVersion>
        
    <groupId>org.bouncycastle</groupId>
        
    <artifactId>bcmail-jdk15on</artifactId>
        
    <packaging>jar</packaging>
        
    <name>Bouncy Castle S/MIME API</name>
        
    <version>1.64</version>
        
    <description>The Bouncy Castle Java S/MIME APIs for handling S/MIME 
protocols. This jar contains S/MIME APIs for JDK 1.5 to JDK 11. The APIs can be 
used in conjunction with a JCE/JCA provider such as the one provided with the 
Bouncy Castle Cryptography APIs. The JavaMail API and the Java activation 
framework will also be needed.</description>
        
    <url>https://www.bouncycastle.org/java.html</url>
        
    <licenses>
                
        <license>
                        
            <name>Bouncy Castle Licence</name>
                        
            <url>https://www.bouncycastle.org/licence.html</url>
                        
            <distribution>repo</distribution>
                    
        </license>
            
    </licenses>
        
    <scm>
                
        <url>https://github.com/bcgit/bc-java</url>
            
    </scm>
        
    <issueManagement>
                
        <system>GitHub</system>
                
        <url>https://github.com/bcgit/bc-java/issues</url>
            
    </issueManagement>
        
    <developers>
                
        <developer>
                        
            <id>feedback-crypto</id>
                        
            <name>The Legion of the Bouncy Castle Inc.</name>
                        
            <email>feedback-cry...@bouncycastle.org</email>
                    
        </developer>
            
    </developers>
        
    <dependencies>
                
        <dependency>
                        
            <groupId>org.bouncycastle</groupId>
                        
            <artifactId>bcprov-jdk15on</artifactId>
                        
            <version>1.64</version>
                        
            <type>jar</type>
                    
        </dependency>
                
        <dependency>
                        
            <groupId>org.bouncycastle</groupId>
                        
            <artifactId>bcpkix-jdk15on</artifactId>
                        
            <version>1.64</version>
                        
            <type>jar</type>
                    
        </dependency>
            
    </dependencies>
    
</project>
++++++ bcpg-jdk15on-1.64.pom ++++++
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
        
    <modelVersion>4.0.0</modelVersion>
        
    <groupId>org.bouncycastle</groupId>
        
    <artifactId>bcpg-jdk15on</artifactId>
        
    <packaging>jar</packaging>
        
    <name>Bouncy Castle OpenPGP API</name>
        
    <version>1.64</version>
        
    <description>The Bouncy Castle Java API for handling the OpenPGP protocol. 
This jar contains the OpenPGP API for JDK 1.5 to JDK 11. The APIs can be used 
in conjunction with a JCE/JCA provider such as the one provided with the Bouncy 
Castle Cryptography APIs.</description>
        
    <url>https://www.bouncycastle.org/java.html</url>
        
    <licenses>
                
        <license>
                        
            <name>Bouncy Castle Licence</name>
                        
            <url>https://www.bouncycastle.org/licence.html</url>
                        
            <distribution>repo</distribution>
                    
        </license>
                
        <license>
                        
            <name>Apache Software License, Version 1.1</name>
                        
            <url>https://www.apache.org/licenses/LICENSE-1.1</url>
                        
            <distribution>repo</distribution>
                    
        </license>
            
    </licenses>
        
    <scm>
                
        <url>https://github.com/bcgit/bc-java</url>
            
    </scm>
        
    <issueManagement>
                
        <system>GitHub</system>
                
        <url>https://github.com/bcgit/bc-java/issues</url>
            
    </issueManagement>
        
    <developers>
                
        <developer>
                        
            <id>feedback-crypto</id>
                        
            <name>The Legion of the Bouncy Castle Inc.</name>
                        
            <email>feedback-cry...@bouncycastle.org</email>
                    
        </developer>
            
    </developers>
        
    <dependencies>
                
        <dependency>
                        
            <groupId>org.bouncycastle</groupId>
                        
            <artifactId>bcprov-jdk15on</artifactId>
                        
            <version>1.64</version>
                        
            <type>jar</type>
                    
        </dependency>
            
    </dependencies>
    
</project>
++++++ bcpkix-jdk15on-1.64.pom ++++++
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
        
    <modelVersion>4.0.0</modelVersion>
        
    <groupId>org.bouncycastle</groupId>
        
    <artifactId>bcpkix-jdk15on</artifactId>
        
    <packaging>jar</packaging>
        
    <name>Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF 
APIs</name>
        
    <version>1.64</version>
        
    <description>The Bouncy Castle Java APIs for CMS, PKCS, EAC, TSP, CMP, 
CRMF, OCSP, and certificate generation. This jar contains APIs for JDK 1.5 to 
JDK 11. The APIs can be used in conjunction with a JCE/JCA provider such as the 
one provided with the Bouncy Castle Cryptography APIs.</description>
        
    <url>https://www.bouncycastle.org/java.html</url>
        
    <licenses>
                
        <license>
                        
            <name>Bouncy Castle Licence</name>
                        
            <url>https://www.bouncycastle.org/licence.html</url>
                        
            <distribution>repo</distribution>
                    
        </license>
            
    </licenses>
        
    <scm>
                
        <url>https://github.com/bcgit/bc-java</url>
            
    </scm>
        
    <issueManagement>
                
        <system>GitHub</system>
                
        <url>https://github.com/bcgit/bc-java/issues</url>
            
    </issueManagement>
        
    <developers>
                
        <developer>
                        
            <id>feedback-crypto</id>
                        
            <name>The Legion of the Bouncy Castle Inc.</name>
                        
            <email>feedback-cry...@bouncycastle.org</email>
                    
        </developer>
            
    </developers>
        
    <dependencies>
                
        <dependency>
                        
            <groupId>org.bouncycastle</groupId>
                        
            <artifactId>bcprov-jdk15on</artifactId>
                        
            <version>1.64</version>
                        
            <type>jar</type>
                    
        </dependency>
            
    </dependencies>
    
</project>
++++++ bcprov-jdk15on-1.64.pom ++++++
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.bouncycastle</groupId>
  <artifactId>bcprov-jdk15on</artifactId>
  <packaging>jar</packaging>
  <name>Bouncy Castle Provider</name>
  <version>1.64</version>
  <description>The Bouncy Castle Crypto package is a Java implementation of 
cryptographic algorithms. This jar contains JCE provider and lightweight API 
for the Bouncy Castle Cryptography APIs for Java 5 to Java 11.</description>
  <url>https://www.bouncycastle.org/java.html</url>
  <licenses>
    <license>
      <name>Bouncy Castle Licence</name>
      <url>https://www.bouncycastle.org/licence.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>https://github.com/bcgit/bc-java</url>
  </scm>
  <issueManagement>
     <system>GitHub</system>
     <url>https://github.com/bcgit/bc-java/issues</url>
  </issueManagement>
  <developers>
    <developer>
      <id>feedback-crypto</id>
      <name>The Legion of the Bouncy Castle Inc.</name>
      <email>feedback-cry...@bouncycastle.org</email>
    </developer>
  </developers>
</project>
++++++ bctls-jdk15on-1.64.pom ++++++
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
        
    <modelVersion>4.0.0</modelVersion>
        
    <groupId>org.bouncycastle</groupId>
        
    <artifactId>bctls-jdk15on</artifactId>
        
    <packaging>jar</packaging>
        
    <name>Bouncy Castle JSSE provider and TLS/DTLS API</name>
        
    <version>1.64</version>
        
    <description>The Bouncy Castle Java APIs for TLS and DTLS, including a 
provider for the JSSE.</description>
        
    <url>https://www.bouncycastle.org/java.html</url>
        
    <licenses>
                
        <license>
                        
            <name>Bouncy Castle Licence</name>
                        
            <url>https://www.bouncycastle.org/licence.html</url>
                        
            <distribution>repo</distribution>
                    
        </license>
            
    </licenses>
        
    <scm>
                
        <url>https://github.com/bcgit/bc-java</url>
            
    </scm>
        
    <issueManagement>
                
        <system>GitHub</system>
                
        <url>https://github.com/bcgit/bc-java/issues</url>
            
    </issueManagement>
        
    <developers>
                
        <developer>
                        
            <id>feedback-crypto</id>
                        
            <name>The Legion of the Bouncy Castle Inc.</name>
                        
            <email>feedback-cry...@bouncycastle.org</email>
                    
        </developer>
            
    </developers>
        
    <dependencies>
                
        <dependency>
                        
            <groupId>org.bouncycastle</groupId>
                        
            <artifactId>bcprov-jdk15on</artifactId>
                        
            <version>1.64</version>
                        
            <type>jar</type>
                    
        </dependency>
            
    </dependencies>
    
</project>
++++++ bouncycastle-CVE-2020-15522.patch ++++++
diff -PpuriN 
bc-java-r1rv65/core/src/main/java/org/bouncycastle/math/ec/ECCurve.java 
bc-java-r1rv66/core/src/main/java/org/bouncycastle/math/ec/ECCurve.java
--- bc-java-r1rv65/core/src/main/java/org/bouncycastle/math/ec/ECCurve.java     
2020-03-31 07:19:14.000000000 +0200
+++ bc-java-r1rv66/core/src/main/java/org/bouncycastle/math/ec/ECCurve.java     
2020-07-06 06:11:06.000000000 +0200
@@ -1,6 +1,7 @@
 package org.bouncycastle.math.ec;
 
 import java.math.BigInteger;
+import java.security.SecureRandom;
 import java.util.Hashtable;
 import java.util.Random;
 
@@ -107,6 +108,8 @@ public abstract class ECCurve
 
     public abstract boolean isValidFieldElement(BigInteger x);
 
+    public abstract ECFieldElement randomFieldElementMult(SecureRandom r);
+
     public synchronized Config configure()
     {
         return new Config(this.coord, this.endomorphism, this.multiplier);
@@ -585,6 +590,18 @@ public abstract class ECCurve
             return x != null && x.signum() >= 0 && 
x.compareTo(this.getField().getCharacteristic()) < 0;
         }
 
+        public ECFieldElement randomFieldElementMult(SecureRandom r)
+        {
+            /*
+             * NOTE: BigInteger comparisons in the rejection sampling are not 
constant-time, so we
+             * use the product of two independent elements to mitigate 
side-channels.
+             */
+            BigInteger p = getField().getCharacteristic();
+            ECFieldElement fe1 = fromBigInteger(implRandomFieldElementMult(r, 
p));
+            ECFieldElement fe2 = fromBigInteger(implRandomFieldElementMult(r, 
p));
+            return fe1.multiply(fe2);
+        }
+
         protected ECPoint decompressPoint(int yTilde, BigInteger X1)
         {
             ECFieldElement x = this.fromBigInteger(X1);
@@ -607,6 +636,28 @@ public abstract class ECCurve
 
             return this.createRawPoint(x, y);
         }
+
+        private static BigInteger implRandomFieldElement(SecureRandom r, 
BigInteger p)
+        {
+            BigInteger x;
+            do
+            {
+                x = BigIntegers.createRandomBigInteger(p.bitLength(), r);
+            }
+            while (x.compareTo(p) >= 0);
+            return x;
+        }
+
+        private static BigInteger implRandomFieldElementMult(SecureRandom r, 
BigInteger p)
+        {
+            BigInteger x;
+            do
+            {
+                x = BigIntegers.createRandomBigInteger(p.bitLength(), r);
+            }
+            while (x.signum() <= 0 || x.compareTo(p) >= 0);
+            return x;
+        }
     }
 
     /**
@@ -835,6 +881,18 @@ public abstract class ECCurve
             return this.createRawPoint(X, Y);
         }
 
+        public ECFieldElement randomFieldElementMult(SecureRandom r)
+        {
+            /*
+             * NOTE: BigInteger comparisons in the rejection sampling are not 
constant-time, so we
+             * use the product of two independent elements to mitigate 
side-channels.
+             */
+            int m = getFieldSize();
+            ECFieldElement fe1 = fromBigInteger(implRandomFieldElementMult(r, 
m));
+            ECFieldElement fe2 = fromBigInteger(implRandomFieldElementMult(r, 
m));
+            return fe1.multiply(fe2);
+        }
+
         /**
          * Decompresses a compressed point P = (xp, yp) (X9.62 s 4.2.2).
          * 
@@ -971,6 +1040,17 @@ public abstract class ECCurve
         {
             return this.order != null && this.cofactor != null && 
this.b.isOne() && (this.a.isZero() || this.a.isOne());
         }
+
+        private static BigInteger implRandomFieldElementMult(SecureRandom r, 
int m)
+        {
+            BigInteger x;
+            do
+            {
+                x = BigIntegers.createRandomBigInteger(m, r);
+            }
+            while (x.signum() <= 0);
+            return x;
+        }
     }
 
     /**
diff -PpuriN 
bc-java-r1rv65/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java 
bc-java-r1rv66/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java
--- bc-java-r1rv65/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java     
2020-03-31 07:19:14.000000000 +0200
+++ bc-java-r1rv66/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java     
2020-07-06 06:11:06.000000000 +0200
@@ -1,8 +1,11 @@
 package org.bouncycastle.math.ec;
 
 import java.math.BigInteger;
+import java.security.SecureRandom;
 import java.util.Hashtable;
 
+import org.bouncycastle.crypto.CryptoServicesRegistrar;
+
 /**
  * base class for points on elliptic curves.
  */
@@ -222,13 +225,31 @@ public abstract class ECPoint
         }
         default:
         {
-            ECFieldElement Z1 = getZCoord(0);
-            if (Z1.isOne())
+            ECFieldElement z = getZCoord(0);
+            if (z.isOne())
             {
                 return this;
             }
 
-            return normalize(Z1.invert());
+            if (null == curve)
+            {
+                throw new IllegalStateException("Detached points must be in 
affine coordinates");
+            }
+
+            /*
+             * Use blinding to avoid the side-channel leak identified and 
analyzed in the paper
+             * "Yet another GCD based inversion side-channel affecting ECC 
implementations" by Nir
+             * Drucker and Shay Gueron.
+             * 
+             * To blind the calculation of z^-1, choose a multiplicative (i.e. 
non-zero) field
+             * element 'b' uniformly at random, then calculate the result 
instead as (z * b)^-1 * b.
+             * Any side-channel in the implementation of 'inverse' now only 
leaks information about
+             * the value (z * b), and no longer reveals information about 'z' 
itself.
+             */
+            SecureRandom r = CryptoServicesRegistrar.getSecureRandom();
+            ECFieldElement b = curve.randomFieldElementMult(r);
+            ECFieldElement zInv = z.multiply(b).invert().multiply(b); 
+            return normalize(zInv);
         }
         }
     }
++++++ bouncycastle-javadoc.patch ++++++
--- bc-java-r1v60/ant/bc+-build.xml     2018-07-02 00:14:10.000000000 +0200
+++ bc-java-r1v60/ant/bc+-build.xml     2018-11-19 18:49:26.961265967 +0100
@@ -106,7 +106,7 @@
                 <javac source="${bc.javac.source}" target="${bc.javac.target}"
                     srcdir="${artifacts.dir}/@{target}/src"
                     destdir="${build.dir}/@{target}/classes"
-                    memoryMaximumSize="512m"
+                    memoryMaximumSize="512m" encoding="utf-8"
                     debug="${release.debug}" fork="true">
                     <classpath>
                         <path refid="project.classpath" /> 
@@ -143,7 +143,7 @@
                 <javac source="${bc.javac.source}" target="${bc.javac.target}"
                     srcdir="${artifacts.dir}/@{target}/src"
                     destdir="${build.dir}/@{target}/classes"
-                    memoryMaximumSize="512m"
+                    memoryMaximumSize="512m" encoding="utf-8"
                     debug="${release.debug}">
                     <classpath>
                         <path refid="project.classpath" /> 
@@ -219,8 +219,8 @@
             <element name="docElements" />
             <sequential>
             <mkdir dir="@{docsDir}" />
-            <javadoc maxmemory="384m" sourcepath="@{srcDir}"
-                     destdir="@{docsDir}"
+            <javadoc maxmemory="384m" sourcepath="@{srcDir}" 
source="${bc.javac.source}"
+                     destdir="@{docsDir}" encoding="utf-8"
                      windowtitle="Bouncy Castle Library ${release.name} API 
Specification"
                      header="&lt;b&gt;Bouncy Castle Cryptography Library 
${release.name}&lt;/b&gt;">
                 <docElements/>
@@ -284,7 +284,7 @@
         <javac source="${bc.javac.source}" target="${bc.javac.target}"
             srcdir="${lcrypto.target.src.dir}"
             destdir="${lcrypto.target.classes.dir}"
-           memoryMaximumSize="512m"
+           memoryMaximumSize="512m" encoding="utf-8"
             fork="true"
             debug="${release.debug}">
             <classpath>

Reply via email to