mirrored from https://www.bouncycastle.org/repositories/bc-java
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert the wrong commit #1768 Implement message decryption using SEIP…
…Dv2 and PKESKv6 packets
- Loading branch information
gefeili
committed
Sep 5, 2024
1 parent
1232b9f
commit 6114940
Showing
11 changed files
with
203 additions
and
899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 0 additions & 76 deletions
76
...rc/main/java/org/bouncycastle/openpgp/operator/AbstractPublicKeyDataDecryptorFactory.java
This file was deleted.
Oops, something went wrong.
31 changes: 1 addition & 30 deletions
31
pg/src/main/java/org/bouncycastle/openpgp/operator/PublicKeyDataDecryptorFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,10 @@ | ||
package org.bouncycastle.openpgp.operator; | ||
|
||
import org.bouncycastle.bcpg.InputStreamPacket; | ||
import org.bouncycastle.bcpg.PublicKeyEncSessionPacket; | ||
import org.bouncycastle.openpgp.PGPException; | ||
|
||
public interface PublicKeyDataDecryptorFactory | ||
extends PGPDataDecryptorFactory | ||
{ | ||
/** | ||
* Recover the plain session info by decrypting the encrypted session key. | ||
* The session info ALWAYS has the symmetric algorithm ID prefixed, so the return value is: | ||
* <pre>[sym-alg][session-key][checksum]?</pre> | ||
* | ||
* @param pkesk public-key encrypted session-key packet | ||
* @param encData encrypted data (sed/seipd/oed) packet | ||
* @return decrypted session info | ||
* @throws PGPException | ||
*/ | ||
byte[] recoverSessionData(PublicKeyEncSessionPacket pkesk, InputStreamPacket encData) | ||
byte[] recoverSessionData(int keyAlgorithm, byte[][] secKeyData) | ||
throws PGPException; | ||
|
||
/** | ||
* Recover the plain session info by decrypting the encrypted session key. | ||
* This method returns the decrypted session info as-is (without prefixing missing cipher algorithm), | ||
* so the return value is: | ||
* <pre>[sym-alg]?[session-key][checksum]?</pre> | ||
* | ||
* @deprecated use {@link #recoverSessionData(PublicKeyEncSessionPacket, InputStreamPacket)} instead. | ||
* @param keyAlgorithm public key algorithm | ||
* @param secKeyData encrypted session key data | ||
* @param pkeskVersion version of the PKESK packet | ||
* @return decrypted session info | ||
* @throws PGPException | ||
*/ | ||
byte[] recoverSessionData(int keyAlgorithm, byte[][] secKeyData, int pkeskVersion) | ||
throws PGPException; | ||
|
||
} |
Oops, something went wrong.