Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spongify/2022 01 25 #58

Open
wants to merge 3,661 commits into
base: spongy-master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3661 commits
Select commit Hold shift + click to select a range
358aa68
Hold boolean instead of the parser
peterdettman Jul 21, 2021
d0bbe2b
Calculate HMAC without extracting TlsSecret
peterdettman Jul 24, 2021
0b9bad6
Refactoring around TLS HKDF
peterdettman Jul 24, 2021
aee2387
Store the PRF CryptoHashAlgorithm
peterdettman Jul 24, 2021
833af57
Only getSessionToResume if pre-1.3 offered
peterdettman Jul 25, 2021
119d5c9
Fix truncate method
peterdettman Jul 25, 2021
3c52967
TLS 1.3 client API for external PSKs
peterdettman Jul 25, 2021
29ed2d6
Added CMS support for LMS.
dghgit Jul 26, 2021
5be7c48
Merge remote-tracking branch 'refs/remotes/origin/master'
dghgit Jul 26, 2021
29ae027
Initial fix for reneg issue
peterdettman Jul 26, 2021
88f0104
PSK binder based on explicit PRF hash
peterdettman Jul 26, 2021
bcafcfb
ClientHello 'splitting' to handle PSK binders
peterdettman Jul 26, 2021
40aba07
ArmoredInputStream: Prevent IOExceptions from being silently swallowed
vanitasvitae Jul 26, 2021
c6812c8
More work on PSK binders
peterdettman Jul 26, 2021
74a0aaa
OfferedPsks.Config and methods to build
peterdettman Jul 26, 2021
49b4aee
Use PSK early secret when negotiated
peterdettman Jul 26, 2021
0e57da7
Add pre_shared_key to ClientHello
peterdettman Jul 27, 2021
46633a0
Seal handshake hash externally
peterdettman Jul 27, 2021
2763774
Filter PSK set for ClientHello retry
peterdettman Jul 27, 2021
ae69f97
ServeHello selected PSK handling
peterdettman Jul 27, 2021
6db3ca1
Added explicit constructor taking a DigestAlgorithmIdentifier finder.…
dghgit Jul 27, 2021
050d09e
Client message flow for PSK handshake
peterdettman Jul 28, 2021
3c82ff5
Set psk_key_exchange_modes extension
peterdettman Jul 28, 2021
1d640e0
Enable only psk_dhe_ke by default
peterdettman Jul 28, 2021
f9cfd83
Allow IOException from notifySelectedPSK
peterdettman Jul 28, 2021
7f8dcfc
Ignore missing CRC checksums by default, but allow modification of th…
vanitasvitae Jul 28, 2021
72213c5
Fix checkstyle issues and add test for missing CRC
vanitasvitae Jul 28, 2021
09e2798
PGPPublicKey: Improve handling of signatures for duplicated user-id/a…
vanitasvitae Jul 31, 2021
76e8043
Ignore PGPSignatures with invalid version
vanitasvitae Aug 5, 2021
c14da29
PGP{Public|Secret}KeyRingCollection: Ignore marker packets when readi…
vanitasvitae Aug 5, 2021
517e418
Ignore marker packets inside of key rings
vanitasvitae Aug 5, 2021
371d7f8
Fix return value for Hex, Base32 encoding
peterdettman Aug 7, 2021
d596ea6
ArmoredInputStream: Skip '\v\f' in blank lines
vanitasvitae Aug 8, 2021
5d51c20
FIPS provider can throw subclass of AssertionError
peterdettman Aug 12, 2021
0d1e3a0
Check version before exporting session parameters
peterdettman Aug 12, 2021
934d7aa
Merge branch 'armor_trvf' of https://github.com/pgpainless/bc-java in…
dghgit Aug 30, 2021
8ef1754
Merge branch 'pgpainless-armor_trvf'
dghgit Aug 30, 2021
a4640cd
Backport change. Relates to github #1007
dghgit Aug 30, 2021
fe5fa10
Merge branch 'armoredInputStreamCRC_dontSwallowIOE' of https://github…
dghgit Aug 30, 2021
0ccbb51
Merge branch 'pgpainless-armoredInputStreamCRC_dontSwallowIOE'
dghgit Aug 30, 2021
7ec84df
Backport change. Relates to github #999
dghgit Aug 30, 2021
b0f2a84
Added check for specific message. Relates to github #999
dghgit Aug 30, 2021
2cede74
Changed setIgnoreMissingCRCSum to setDetectMissingCRC, added extra te…
dghgit Aug 30, 2021
63c3371
Merge branch 'signatureSubpacketVectorFactoryMethod' of
dghgit Aug 30, 2021
02a7cc0
Merge branch 'pgpainless-signatureSubpacketVectorFactoryMethod'
dghgit Aug 30, 2021
a21a94e
Minor reformatting. Relates to github #980
dghgit Aug 30, 2021
38d1f39
JavaDoc. Relates to github #999
dghgit Aug 30, 2021
a8eac9c
pgp updates
dghgit Aug 30, 2021
ea8caf8
Filtered out bogus localKey id where attribute duplicated. Relates to…
dghgit Aug 30, 2021
5f4c0a6
added P12 fix
dghgit Aug 30, 2021
916c441
Merge branch 'ignoreInvalidSignatureVersions' of https://github.com/p…
dghgit Aug 30, 2021
a1ce3fd
Merge branch 'pgpainless-ignoreInvalidSignatureVersions'
dghgit Aug 30, 2021
402920e
Added specific exception for unrecognised signature. Relates to githu…
dghgit Aug 30, 2021
d2b513b
github #1006
dghgit Aug 30, 2021
1a9b153
Merge branch 'getAllSigsForUserId' of https://github.com/pgpainless/b…
dghgit Aug 31, 2021
8cdfce3
Merge branch 'pgpainless-getAllSigsForUserId'
dghgit Aug 31, 2021
92e9ef5
Can't use diamond operator
peterdettman Aug 31, 2021
74546c8
Test client for TLS 1.3 (external) PSK
peterdettman Aug 31, 2021
a539b42
Cleanup new PSK test
peterdettman Aug 31, 2021
8a65585
Adding setting of expected data length github #1003.
dghgit Sep 1, 2021
94fd7b8
changed private static fields to protected to allow for extension cla…
dghgit Sep 1, 2021
efe3e9e
added method for adding additional digestAlgorithm to SignedData. Rel…
dghgit Sep 1, 2021
5f6b620
recognised Curve25519/Ed25519 in PGPPublicKey.getBitStrength(). Relat…
dghgit Sep 3, 2021
94e8b9c
refactored use of writePacket with oldFormat == true into a single me…
dghgit Sep 3, 2021
2d7814a
Added constructor for switching off old format packets. Relates to gi…
dghgit Sep 3, 2021
57494e1
Issue: #1
meganwoods Sep 6, 2021
a3990d4
relates to #1 - removed use of ":" operator.
dghgit Sep 6, 2021
ffdf8aa
refactored to use fromExtensions().
dghgit Sep 6, 2021
0a8ed7b
fixed cut/paste error.
dghgit Sep 6, 2021
2011048
Avoid duplicate method call
peterdettman Sep 8, 2021
a486e6b
Check DH standard group lookup
peterdettman Sep 11, 2021
6e761bc
Police output limit
tonywasher Sep 11, 2021
adc44e3
Remove output limit checks
tonywasher Sep 11, 2021
fd6141c
Add public method to make OID from contents octets
peterdettman Sep 22, 2021
b4a2fce
Backward compatibility for ASN1ObjectIdentifier
peterdettman Sep 22, 2021
02c14f2
Fixes for new_session_ticket
peterdettman Oct 4, 2021
c805c8c
Merge branch 'ignoreMarker' of https://github.com/pgpainless/bc-java …
mwcw Oct 4, 2021
946aedb
Removed recursive call
mwcw Oct 4, 2021
3286401
Merge branch 'pgpainless-ignoreMarker' into master
mwcw Oct 4, 2021
05a8a9b
GitHub PR: 970
mwcw Oct 4, 2021
dbadf94
Merge branch 'patches/xof/Kangaroo' of https://github.com/tonywasher/…
mwcw Oct 5, 2021
caa805b
Fixed non compiling test
mwcw Oct 5, 2021
f461a82
Merge branch 'tonywasher-patches/xof/Kangaroo' into master
mwcw Oct 5, 2021
92cb742
Merged Github PR 1036
mwcw Oct 5, 2021
d4c7ce0
Merge branch 'patches/xof/blake3' of https://github.com/tonywasher/bc…
mwcw Oct 5, 2021
555471b
Merged PR 1037
mwcw Oct 5, 2021
d13ac14
Merge branch 'tonywasher-patches/xof/blake3' into master
mwcw Oct 5, 2021
35b0c18
Merged PR 1037
mwcw Oct 5, 2021
c853df5
Merge branch 'features/engines/LEA' of https://github.com/tonywasher/…
mwcw Oct 5, 2021
2c23d5c
Merged PR 874
mwcw Oct 5, 2021
1ded138
Merge branch 'tonywasher-features/engines/LEA' into master
mwcw Oct 5, 2021
2f82dfa
Merged PR 874
mwcw Oct 5, 2021
8733846
Merge branch 'nit/split-up-signer-information-doVerify' of https://gi…
mwcw Oct 6, 2021
5b957d1
Merged GitHub PR 936
mwcw Oct 6, 2021
50f48c2
Merge branch 'ties-nit/split-up-signer-information-doVerify' into master
mwcw Oct 6, 2021
c633a03
Updated CONTRIBUTORS.html
mwcw Oct 6, 2021
5fe4701
changed copied data to re-evaluate.
dghgit Oct 7, 2021
ae483ec
furher tweak to re-evaluate.
dghgit Oct 7, 2021
72b53b6
Merge remote-tracking branch 'refs/remotes/origin/master'
dghgit Oct 10, 2021
d227e14
Updated release notes.
mwcw Oct 11, 2021
a82244f
added additional assert check.
dghgit Oct 12, 2021
b55a444
Merge remote-tracking branch 'refs/remotes/origin/master'
dghgit Oct 12, 2021
28874e8
relates to github #1030 added recovery of session keys.
dghgit Oct 12, 2021
a8a3783
Improve marker packet skipping
peterdettman Oct 12, 2021
bd99562
Cleanup around ArmoredInputStream
peterdettman Oct 12, 2021
64704c7
relates to github #1030
dghgit Oct 12, 2021
8736eb0
Merge remote-tracking branch 'refs/remotes/origin/master'
dghgit Oct 12, 2021
c21ceeb
relates to github #1035/#1040 added canonicalizing literal data gener…
dghgit Oct 13, 2021
f11f5d3
relates to github #1035/#1040
dghgit Oct 13, 2021
34caa76
Cleanup of ignored PGP signatures
peterdettman Oct 13, 2021
60bb051
ASN.1 refactoring
peterdettman Oct 14, 2021
d50c684
Remove unused method
peterdettman Oct 14, 2021
04ed8e2
ASN.1 refactoring
peterdettman Oct 16, 2021
1b9bc82
PGP utility methods
peterdettman Oct 16, 2021
feb17db
Fix test names
peterdettman Oct 16, 2021
591b2a5
BiString refactoring
peterdettman Oct 16, 2021
9f95e5c
TLS 1.3 PSK server-side work
peterdettman Oct 16, 2021
6937367
Server-side PSK selection
peterdettman Oct 17, 2021
fc142e1
Experimental server-side TLS 1.3 PSK
peterdettman Oct 17, 2021
a0e4a16
Add some missing PGPSignatureSubpacketVector getters
vanitasvitae Oct 20, 2021
02dfc5f
Add getNotationDataOccurrences(name)
vanitasvitae Oct 20, 2021
4fe74fa
Add missing isExportable, isRevocable and getIntendedRecipientFingerp…
vanitasvitae Oct 20, 2021
eb465fe
Features: add getFeatures() method to extract features byte
vanitasvitae Oct 22, 2021
2e0697d
Issue #3 (GitHub issue: 794)
mwcw Oct 28, 2021
e85d8a9
Merge branch 'master' of gitlab.cryptoworkshop.com:root/bc-java into …
mwcw Oct 28, 2021
571610a
Issue #3 (GitHub issue: 794)
mwcw Oct 29, 2021
8ee8aca
Trim the stack trace
peterdettman Oct 31, 2021
fc81ad1
Remove unnecessary chunking
peterdettman Oct 31, 2021
4ce9ddd
Checkstyle fixes
peterdettman Oct 31, 2021
d0a4950
removed use of Assert in ExSExprTest
dghgit Oct 31, 2021
19da8d1
TLS: Check policy restrictions for ciphers
peterdettman Nov 1, 2021
c4dc1f9
Trim the stack trace
peterdettman Nov 3, 2021
9dfc320
Create PGPKeyRingGenerator constructor for key rings without user-id
vanitasvitae Nov 3, 2021
9cab8c9
Fix ASN.1 External constructors taking tagged object
peterdettman Nov 5, 2021
a7ac683
Method shouldn't be public
peterdettman Nov 5, 2021
c1afa8e
Remove unnecessary operation
peterdettman Nov 5, 2021
7962f79
Remove unnecessary static reference
peterdettman Nov 5, 2021
eb84898
Rework ASN.1 External
peterdettman Nov 5, 2021
b90a427
TLS: Improve ASN.1 parsing
peterdettman Nov 5, 2021
8cf896e
Fix javadoc
peterdettman Nov 5, 2021
09a0198
Add null checks
peterdettman Nov 6, 2021
bf26058
Refactor getString
peterdettman Nov 6, 2021
009d6a9
Encode External via Sequence
peterdettman Nov 6, 2021
30999aa
Add TODO
peterdettman Nov 7, 2021
f79d0d8
ASN.1: Add support for relative OIDs
peterdettman Nov 7, 2021
aa76467
Handle ApplicationSpecific via TaggedObject
peterdettman Nov 7, 2021
a635269
Add TODOs
peterdettman Nov 7, 2021
d3b5395
Improve mixed-signed-data test
peterdettman Nov 7, 2021
ac98f97
isConstructed -> encodeConstructed
peterdettman Nov 7, 2021
1034077
Defensive guards
peterdettman Nov 7, 2021
de655fb
removed length checks, added some extra conversions for Ed448/X448 su…
dghgit Nov 7, 2021
2cba297
Fix instanceof check
peterdettman Nov 8, 2021
9e7452e
Refactor lazy ASN.1 stuff
peterdettman Nov 8, 2021
6c24710
ASN.1 refactoring
peterdettman Nov 8, 2021
6c62aee
Add setters/getters for AEAD algorithm preferences
vanitasvitae Nov 8, 2021
5be3649
ASN.1 refactoring
peterdettman Nov 8, 2021
8329067
PGP Reinstated commented out tests, added lookup for Teletrust curve.…
mwcw Nov 9, 2021
850ca88
Fixed checkstyle issue.
mwcw Nov 9, 2021
543ddb4
Fix deprecated call
peterdettman Nov 9, 2021
97b31d6
Spelling
peterdettman Nov 9, 2021
50afd06
Extra test case
peterdettman Nov 9, 2021
f936711
Merge branch 'subpacketVectorAdditions' of https://github.com/pgpainl…
dghgit Nov 10, 2021
a4ac918
Merge branch 'pgpainless-subpacketVectorAdditions'
dghgit Nov 10, 2021
e47a012
minor formatting/compatibility.
dghgit Nov 10, 2021
e1e9947
Remove unnecessary argument
peterdettman Nov 11, 2021
e4368fa
Use factory methods
peterdettman Nov 11, 2021
a9c1e10
Trim stack trace
peterdettman Nov 11, 2021
4cd989d
Remove redundant method
peterdettman Nov 11, 2021
71f8e29
added check for final '\n' in crLF case. Relates to github #1056.
dghgit Nov 12, 2021
27dbb7c
Merge remote-tracking branch 'refs/remotes/origin/master'
dghgit Nov 12, 2021
a80570a
added support for SHAKE Xofs in BcDefaultDigestProvider - deals with …
dghgit Nov 12, 2021
450d67d
relates to #988
dghgit Nov 12, 2021
56bb1e3
added missing shake OIDs. Relates to github #1047
dghgit Nov 12, 2021
6876810
relates to github #1047
dghgit Nov 12, 2021
e6041f4
compatibility fixes.
dghgit Nov 12, 2021
1036e8c
Tagged object cleanup
peterdettman Nov 12, 2021
7e7e6a2
Merge remote-tracking branch 'refs/remotes/origin/master'
dghgit Nov 13, 2021
c76b032
Updated some API to use ASN.1 BitString
dghgit Nov 14, 2021
f85423d
Further use of ASN1BitString.
dghgit Nov 14, 2021
47cec57
added use of ASN1BitString
dghgit Nov 14, 2021
5408cbd
Compatibility changes.
dghgit Nov 15, 2021
bfe1ac9
initial sphincs+ implementation
dghgit Nov 15, 2021
7571b78
compatibility updates.
dghgit Nov 15, 2021
b260b2d
test data for sphincs+
dghgit Nov 15, 2021
5627c8b
fixed typo. Relates to github #1047
dghgit Nov 15, 2021
97c8dc7
added SM3, relates to github #1047.
dghgit Nov 16, 2021
995aa94
Merge branch 'directKeySignedPrimaryKey' of https://github.com/pgpain…
dghgit Nov 16, 2021
a0017aa
Merge branch 'pgpainless-directKeySignedPrimaryKey'
dghgit Nov 16, 2021
af1afd9
minor formatting.
dghgit Nov 16, 2021
d9cf707
update #1047 #1055
dghgit Nov 16, 2021
03a3cec
added CMS support for SHA3 PLAIN-ECDSA (github #975)
dghgit Nov 16, 2021
57a6029
ASN.1: Nested tagged objects parser API
peterdettman Nov 16, 2021
38ec8a4
Tagged object refactoring
peterdettman Nov 17, 2021
22657b2
Optimise getString
peterdettman Nov 18, 2021
0606eba
Cleanup from bc-csharp port
peterdettman Nov 18, 2021
908c72a
Remove misleading comments.
peterdettman Nov 19, 2021
64e7c5f
Reliably skip identifier and length octets
peterdettman Nov 19, 2021
5d503a2
ASN.1: Tagged object parser improvements
peterdettman Nov 20, 2021
bc67a2c
Cleanup
peterdettman Nov 20, 2021
3e9bacb
Fix to work for all tag classes
peterdettman Nov 21, 2021
6376416
Restore code from before accidental debug commit
peterdettman Nov 23, 2021
0a24b14
JavaDoc.
dghgit Nov 24, 2021
083f89b
compatibility changes
dghgit Nov 24, 2021
6264736
added use of ASN1BitString.
dghgit Nov 24, 2021
43c1c89
refactored out LMS TSP test.
dghgit Nov 24, 2021
216d809
fixed to use Helper rather than Cipher.getInstance for recovering pri…
dghgit Nov 25, 2021
ccdfa71
fix for extra github #823 issue
dghgit Nov 25, 2021
c41705a
added getUserKeyingMaterial() - relates to github #1043.
dghgit Nov 25, 2021
91ce81d
changed default on copyWithNewPassword to USAGE_SHA1 instead of USAGE…
dghgit Nov 25, 2021
2dd5fdf
Added method to pass in digest calculator for checksum when required.…
dghgit Nov 25, 2021
b7ea571
added DefaultSignatureNameFinder, relates to github #1049.
dghgit Nov 26, 2021
8352698
correct getOutputSize(), relates to github #650.
dghgit Nov 26, 2021
77c86c0
fixed encoding/decoding for IES parameters github #649.
dghgit Nov 26, 2021
e5d8d5b
compatibility updates.
dghgit Nov 26, 2021
e431487
added check for null encoding on private key (github #723).
dghgit Nov 26, 2021
3fbd3df
github #723 transporting protected keys in a BKS key store.
dghgit Nov 26, 2021
86576f8
added close for command line Dump utility. Relates to github #634.
dghgit Nov 26, 2021
d79c511
corrected references to original source material.
dghgit Nov 26, 2021
6400978
compatibility updates.
dghgit Nov 27, 2021
44b8a44
compatibility updates.
dghgit Nov 27, 2021
5b2a705
1.70 update
dghgit Nov 27, 2021
a501313
deleted bad import.
dghgit Nov 27, 2021
6a76423
added shortValue().
dghgit Nov 27, 2021
1325715
Update release notes for 1.70
peterdettman Nov 28, 2021
82ea9db
J2ME compatibility changes.
dghgit Nov 28, 2021
0822587
Merge remote-tracking branch 'refs/remotes/origin/master'
dghgit Nov 28, 2021
9657d2a
final updates for 1.70
dghgit Nov 29, 2021
854cbdc
170 update
dghgit Nov 29, 2021
e77a7f0
added its, oer, sphincsplus, and ets
dghgit Nov 29, 2021
2f490d3
added release date
dghgit Nov 29, 2021
b04d74f
added extra JavaDoc generation - bcutil OER packages
dghgit Nov 29, 2021
c9240d0
removed duplicate
dghgit Nov 29, 2021
66f0563
removed duplicate
dghgit Nov 29, 2021
1ef1da0
added sphincsplus export.
dghgit Nov 30, 2021
e72ee26
Added become-spongy.sh from https://gist.github.com/scottyab/8003892 …
Erhannis Jan 26, 2022
ee59d37
Missed some stuff?
Erhannis Jan 26, 2022
ecebad7
stuffff
Erhannis Jan 26, 2022
d3ba104
.gitignore patched
Erhannis Jan 26, 2022
e4c471f
(cherry-pick) Git-ignore files generated during Gradle build
rtyley May 28, 2017
969b116
(cherry-pick) Gradle: Remove mail the easiest way...
Erhannis Jan 26, 2022
e8094bd
(cherry-pick) Disable failing TLS tests
Erhannis Jan 26, 2022
e64baa2
(cherry-pick) Don't compile `mail`
Erhannis Jan 26, 2022
f9572fb
(cherry-pick) Ignore JavaDoc doclint errors which kill release under …
Erhannis Jan 26, 2022
7f18984
(cherry-pick) Disable test that attempts to deserialise org.bouncycas…
Erhannis Jan 26, 2022
fad1d47
Oh, I borked up a line with the replacements earlier
Erhannis Jan 26, 2022
bcb14b8
BROKEN Fixed some replacement oopsies. Trying to get tests to run.
Erhannis Jan 26, 2022
0a242d6
Looks like I replaced badly, earlier. It builds, now, though I disab…
Erhannis Jan 26, 2022
8aa9ace
chmod +x jar_process.sh
Erhannis Feb 2, 2022
c5db7c3
Removed some of the logging I added to the tests earlier
Erhannis Feb 2, 2022
158bcfb
Oh, and removed this tweak from testing
Erhannis Feb 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*.html text diff=html
*.java text diff=java
*.pem text
#*.rsp text
*.tmpl text

# Denote all files that are truly binary and should not be modified.
Expand Down
960 changes: 960 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: java
jdk:
- openjdk8
182 changes: 153 additions & 29 deletions CONTRIBUTORS.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion LICENSE.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<body bgcolor=#ffffff>

Copyright (c) 2000-2017 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org)
Copyright (c) 2000-2021 The Legion of the Bouncy Castle Inc. (https://www.spongycastle.org)
<p>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
Expand Down
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
# The Bouncy Castle Crypto Package For Java

The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms, it was developed by the Legion of the Bouncy Castle, a registered Australian Charity, with a little help! The Legion, and the latest goings on with this package, can be found at [http://www.bouncycastle.org](http://www.bouncycastle.org).
[![Build Status](https://travis-ci.org/bcgit/bc-java.svg?branch=master)](https://travis-ci.org/bcgit/bc-java)

The Legion also gratefully acknowledges the contributions made to this package by others (see [here](http://www.bouncycastle.org/contributors.html) for the current list). If you would like to contribute to our efforts please feel free to get in touch with us or visit our [donations page](https://www.bouncycastle.org/donate), sponsor some specific work, or purchase a support contract through [Crypto Workshop](http://www.cryptoworkshop.com).
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms, it was developed by the Legion of the Bouncy Castle, a registered Australian Charity, with a little help! The Legion, and the latest goings on with this package, can be found at [https://www.spongycastle.org](https://www.spongycastle.org).

The Legion also gratefully acknowledges the contributions made to this package by others (see [here](https://www.spongycastle.org/contributors.html) for the current list). If you would like to contribute to our efforts please feel free to get in touch with us or visit our [donations page](https://www.spongycastle.org/donate), sponsor some specific work, or purchase a support contract through [Crypto Workshop](https://www.cryptoworkshop.com).

The package is organised so that it contains a light-weight API suitable for use in any environment (including the newly released J2ME) with the additional infrastructure to conform the algorithms to the JCE framework.

Except where otherwise stated, this software is distributed under a license based on the MIT X Consortium license. To view the license, [see here](http://www.bouncycastle.org/licence.html). The OpenPGP library also includes a modified BZIP2 library which is licensed under the [Apache Software License, Version 2.0](http://www.apache.org/licenses/).
Except where otherwise stated, this software is distributed under a license based on the MIT X Consortium license. To view the license, [see here](https://www.spongycastle.org/licence.html). The OpenPGP library also includes a modified BZIP2 library which is licensed under the [Apache Software License, Version 2.0](https://www.apache.org/licenses/).

**Note**: this source tree is not the FIPS version of the APIs - if you are interested in our FIPS version please contact us directly at [office@bouncycastle.org](mailto:office@bouncycastle.org).
**Note**: this source tree is not the FIPS version of the APIs - if you are interested in our FIPS version please contact us directly at [office.spongycastle.org](mailto:office.spongycastle.org).

## Code Organisation

The clean room JCE, for use with JDK 1.1 to JDK 1.3 is in the jce/src/main/java directory.
The clean room JCE, for use with JDK 1.1 to JDK 1.3 is in the jce/src/main/java directory. From JDK 1.4 and later the JCE ships with the JVM, the source for later JDKs follows the progress that was made in the later versions of the JCE. If you are using a later version of the JDK which comes with a JCE install please **do not** include the jce directory as a source file as it will clash with the JCE API installed with your JDK.

The **core** module provides all the functionality in the ligthweight APIs.

The **prov** module provides all the JCA/JCE provider functionality.

The **util** module is the home for code which is used by other modules that does not need to be in prov. At the moment this is largely ASN.1 classes for the PKIX module.

The **pkix** module is the home for code for X.509 certificate generation and the APIs for standards that rely on ASN.1 such
as CMS, TSP, PKCS#12, OCSP, CRMF, and CMP.

The **mail** module provides an S/MIME API built on top of CMS.

The **pg** module is the home for code used to support OpenPGP.

The **tls** module is the home for code used to a general TLS API and JSSE Provider (as at 1.56 this should be considered a beta).
The **tls** module is the home for code used to a general TLS API and JSSE Provider.

The build scripts that come with the full distribution allow creation of the different releases by using the different source trees while excluding classes that are not appropriate and copying in the required compatibility classes from the directories containing compatibility classes appropriate for the distribution.

Expand All @@ -36,40 +40,40 @@ If you want to try create a build for yourself, using your own environment, the

To view some examples, look at the test programs in the packages:

* **org.bouncycastle.crypto.test**
* **org.spongycastle.crypto.test**

* **org.bouncycastle.jce.provider.test**
* **org.spongycastle.jce.provider.test**

* **org.bouncycastle.cms.test**
* **org.spongycastle.cms.test**

* **org.bouncycastle.mail.smime.test**
* **org.spongycastle.mail.smime.test**

* **org.bouncycastle.openpgp.test**
* **org.spongycastle.openpgp.test**

* **org.bouncycastle.tsp.test**
* **org.spongycastle.tsp.test**

There are also some specific example programs for dealing with SMIME and OpenPGP. They can be found in:

* **org.bouncycastle.mail.smime.examples**
* **org.spongycastle.mail.smime.examples**

* **org.bouncycastle.openpgp.examples**
* **org.spongycastle.openpgp.examples**

## Mailing Lists

For those who are interested, there are 2 mailing lists for participation in this project. To subscribe use the links below and include the word subscribe in the message body. (To unsubscribe, replace **subscribe** with **unsubscribe** in the message body)

* [announce-crypto-request@bouncycastle.org](mailto:announce-crypto-request@bouncycastle.org)
* [announce-crypto-request.spongycastle.org](mailto:announce-crypto-request.spongycastle.org)
This mailing list is for new release announcements only, general subscribers cannot post to it.
* [dev-crypto-request@bouncycastle.org](mailto:dev-crypto-request@bouncycastle.org)
* [dev-crypto-request.spongycastle.org](mailto:dev-crypto-request.spongycastle.org)
This mailing list is for discussion of development of the package. This includes bugs, comments, requests for enhancements, questions about use or operation.

**NOTE:**You need to be subscribed to send mail to the above mailing list.
**NOTE:** You need to be subscribed to send mail to the above mailing list.

## Feedback
## Feedback and Contributions

If you want to provide feedback directly to the members of **The Legion** then please use [feedback-crypto@bouncycastle.org](mailto:feedback-crypto@bouncycastle.org), if you want to help this project survive please consider [donating](https://www.bouncycastle.org/donate).
If you want to provide feedback directly to the members of **The Legion** then please use [feedback-crypto.spongycastle.org](mailto:feedback-crypto.spongycastle.org), if you want to help this project survive please consider [donating](https://www.spongycastle.org/donate).

For bug reporting/requests you can report issues here on github, via feedback-crypto if required, and we also have a [Jira issue tracker](http://www.bouncycastle.org/jira). We will accept pull requests based on this repository as well.
For bug reporting/requests you can report issues here on github, or via feedback-crypto if required. We will accept pull requests based on this repository as well, but only on the basis that any code included may be distributed under the [Bouncy Castle License](https://www.spongycastle.org/licence.html).

## Finally

Expand Down
5 changes: 5 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Reporting a security issue

If you would like to report something you believe to be a security issue
then please use feedback-crypto.spongycastle.org.
We can provide a PGP key if required.
105 changes: 105 additions & 0 deletions add_module.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
export JAVA_9=/usr/lib/jvm/java-9.0.4-oracle-x64
export JAVA_11=/usr/lib/jvm/java-11-openjdk-amd64
export JAVA_15=/opt/jdk-15

export JAVA_HOME=$JAVA_9
export PATH=$JAVA_HOME/bin:$PATH

if [ $# -ne 1 ]
then
echo "usage: add_module.sh prov|prov-ext|util|tls|pg|pkix|mail|jmail"
exit 0
fi

for jarName in bc$1-jdk15on-*.jar
do

rm -rf module.tmp

# Java 9 Step
(
export JAVA_HOME=$JAVA_9
export PATH=$JAVA_HOME/bin:$PATH

mkdir -p module.tmp/v5
mkdir -p module.tmp/versions/v9
mkdir -p module.tmp/versions/v11
( cd module.tmp/v5; jar xf ../../build/artifacts/jdk1.5/jars/$jarName )

provJar=`echo build/artifacts/jdk1.5/jars/bcprov-jdk15on*.jar`
utilJar=`echo build/artifacts/jdk1.5/jars/bcutil-jdk15on*.jar`
pkixJar=`echo build/artifacts/jdk1.5/jars/bcpkix-jdk15on*.jar`
if [ $1 = "prov" ]
then
javac -target 1.9 -classpath module.tmp/v5 -d module.tmp/v9 `find $1/src/main/jdk1.9 -name "*.java"` -sourcepath $1/src/main/jdk1.9:$1/src/main/java:core/src/main/java
$JAVA_11/bin/javac -classpath module.tmp/v5 -d module.tmp/v11 `find $1/src/main/jdk1.11 -name "*.java"` -sourcepath $1/src/main/jdk1.11:$1/src/main/java:core/src/main/java
$JAVA_15/bin/javac -classpath module.tmp/v5:module.tmp/v11 -d module.tmp/v15 `find prov/src/main/jdk1.15 -name "*.java"` -sourcepath prov/src/main/jdk1.15:prov/src/main/jdk1.11:prov/src/main/java:core/src/main/java
elif [ $1 = "prov-ext" ]
then
javac -target 1.9 -classpath module.tmp/v5 -d module.tmp/v9 `find prov/src/main/ext-jdk1.9 -name "*.java"` -sourcepath prov/src/main/ext-jdk1.9:prov/src/main/java:core/src/main/java
$JAVA_11/bin/javac -classpath module.tmp/v5 -d module.tmp/v11 `find prov/src/main/jdk1.11 -name "*.java"` -sourcepath prov/src/main/jdk1.11:prov/src/main/java:core/src/main/java
$JAVA_15/bin/javac -classpath module.tmp/v5:module.tmp/v11 -d module.tmp/v15 `find prov/src/main/jdk1.15 -name "*.java"` -sourcepath prov/src/main/jdk1.15:prov/src/main/jdk1.11:prov/src/main/java:core/src/main/java
elif [ $1 = "mail" ]
then
javac -target 1.9 --module-path ${provJar}:$utilJar:$pkixJar -classpath module.tmp/v5 -d module.tmp/v9 `find $1/src/main/jdk1.9 -name "*.java"` -sourcepath $1/src/main/jdk1.9:$1/src/main/java
elif [ $1 = "jmail" ]
then
jmailSrc=`echo build/artifacts/jdk1.5/bcjmail-jdk15on-*/src/`
javac -target 1.9 --module-path ${provJar}:$utilJar:$pkixJar -classpath module.tmp/v5 -d module.tmp/v9 `find $1/src/main/jdk1.9 -name "*.java"` -sourcepath $1/src/main/jdk1.9:$jmailSrc
elif [ $1 = "pkix" ]
then
javac -target 1.9 --module-path ${provJar}:$utilJar -classpath module.tmp/v5 -d module.tmp/v9 `find $1/src/main/jdk1.9 -name "*.java"` -sourcepath $1/src/main/jdk1.9:$1/src/main/java
elif [ $1 = "tls" ]
then
javac -target 1.9 --module-path ${provJar}:$utilJar -classpath module.tmp/v5 -d module.tmp/v9 `find $1/src/main/jdk1.9 -name "*.java"` -sourcepath $1/src/main/jdk1.9:$1/src/main/java
else
javac -target 1.9 --module-path $provJar -classpath module.tmp/v5 -d module.tmp/v9 `find $1/src/main/jdk1.9 -name "*.java"` -sourcepath $1/src/main/jdk1.9:$1/src/main/java
fi
)
# Java 11 Step
(
export JAVA_HOME=$JAVA_11
export PATH=$JAVA_HOME/bin:$PATH

cd module.tmp
if [ -d v11 ]
then
extras=`2>&1 jar cf $jarName -C v5 . --release 9 -C v9 . --release 11 -C v11 . | egrep Warning | sed -e "s/Warning: entry //" | sed -e "s/ contains.*$//"`
else
extras=`2>&1 jar cf $jarName -C v5 . --release 9 -C v9 . | egrep Warning | sed -e "s/Warning: entry //" | sed -e "s/ contains.*$//"`
fi
for f in `echo $extras`
do
p=`echo $f | sed -e "s:META-INF/versions/9::"`
rm v9/$p
done
)
sh ./bnd.sh build/artifacts/jdk1.5/jars/$jarName
cp build/artifacts/jdk1.5/jars/$jarName module.tmp/$jarName
# Java 11 Step
(
export JAVA_HOME=$JAVA_11
export PATH=$JAVA_HOME/bin:$PATH

cd module.tmp
jar uf $jarName --release 9 -C v9 .
if [ -d v11 ]
then
jar uf $jarName --release 11 -C v11 .
fi
)
# Java 15 Step
(
export JAVA_HOME=$JAVA_15
export PATH=$JAVA_HOME/bin:$PATH

cd module.tmp
if [ -d v15 ]
then
jar uf $jarName --release 15 -C v15 .
fi
)
cp module.tmp/$jarName build/artifacts/jdk1.5/jars/$jarName

bcsign-oracle build/artifacts/jdk1.5/jars/$jarName
done
Loading