Skip to content

Tls injection mechanism - #1517

Open
sergejskozlovics wants to merge 926 commits into
bcgit:mainfrom
LUMII-Syslab:tls-injection2
Open

Tls injection mechanism#1517
sergejskozlovics wants to merge 926 commits into
bcgit:mainfrom
LUMII-Syslab:tls-injection2

Conversation

@sergejskozlovics

Copy link
Copy Markdown

I have developed a TLS injection mechanism. It can be used to inject PQC algorithms (KEMs and signature algorithms) into TLS 1.3. The injection mechanism is located in the org.bouncycastle.tls.injection package, where the InjectionPoint class has been defined. Then, there are many places where InjectionPoint is consulted for injected KEMs and signature algorithms, which are added to the corresponding lists of supported TLS algorithms.

@peterdettman

Copy link
Copy Markdown
Collaborator

Hi Sergejs, thanks for the PR. It will be a while before a full review can be done, but on a first pass I have seen some basic issues:

  • core project cannot depend on tls project (only the reverse). So I guess the basic injection concept would have to live in core and be used/built-upon by tls.
  • tls project supports still minimum java version 5 (actually we still build also for jdk 1.4 with org.bouncycastle.tls classes only - no JSSE). I see at least some usage of Java 8 stream API, which should be replaced, and perhaps there are others. There are src/main/jdk??? folders to provide multi-release override classes if needed.
  • There's some incidental reformatting that should be removed from the patch; I see various imports collapsed to ".*", braces moved, some switch case indentation, and there's probably more.

We are certainly interested in getting PQC algorithms into TLS, but our intention would be to proceed by publishing algorithms in the BC provider as usual, then having TLS add the registrar entries from the relevant standards and support them when it can find the algorithm via the provider. Perhaps you could comment a little about what you have in mind in terms of the basic "injection" idea here, particularly in comparison to the existing provider-based mechanism.

gefeili and others added 29 commits February 12, 2024 17:39
2. add TlsCryptoParameters
…edDataList, PGPCompressedDataGenerator and PGPUtil.

Extract PGPDefaultSignatureGenerator.getAttriubtesHash from PGPSignature and PGPSignatureGenerator.Invert PGPSignatureGenerator.packetPresent to packetNotPresent.
…er allow Camellia. Add tests to BcImplProvider, BcKeyFingerprintCalculator, BcPGPContentVerifierBuilderProvider, BcPGPDataEncryptorBuilder and JcePGPDataEncryptorBuilder.
…Marker, PGPOnePassSignature, PGPPadding, PGPSignature and PGPLiteralDataGenerator.
…Converter. Add tests for JcaPGPDigestCalculatorProviderBuilder, BcPGPKeyConverter, JcaPGPKeyConverter, and JcaPGPDigestCalculatorProviderBuilder.
…Data, PGPSignature, JcaPGPContentSignerBuilder, JcaPGPKeyPair, PGPSignatureList and PGPEncryptedDataGenerator.
…GPLiteralData, and PGPUserAttributeSubpacketVectorGenerator.
…Factory, BcPublicKeyKeyEncryptionMethodGenerator, JcaPGPContentVerifierBuilderProvider, etc.
dghgit and others added 29 commits April 5, 2024 03:15
Signed-off-by: Alexander Scheel <alexander.scheel@keyfactor.com>
As reported by @CipherGato, CCM fails to decrypt a full-length message
for n=13, q=2 (maximum length 65,535). This is because the input message
already includes the flags and nonce components (B0 from SP800 38C).
Correctly handle full-length CCM decryption.

Resolves: bcgit#1570

Signed-off-by: Alexander Scheel <alexander.scheel@keyfactor.com>
Removed Camellia wrap enable property from OpenPGP (not required).
Signed-off-by: Alexander Scheel <alexander.scheel@keyfactor.com>
…ving only Asn1Bridge and Asn1BridgeForInjectedSigAlgs there; no dependency on the tls package
…jection Mechanism. Besides, UniversalKeyPairGenerator is difficult to implement.
…fallback algorithm for the BC adapter (since <hash-name>WITHRSAANDMGF1 sometimes is not found)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.