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

Add support for switching cipher methods #156

Merged
merged 5 commits into from
Jul 6, 2023

Conversation

seba-aln
Copy link
Contributor

@seba-aln seba-aln commented Apr 26, 2023

feat: Option to change the ciphering method

Introduced option to select ciphering method for encoding messages and files. The default behavior is unchanged. More can be read in this comment

@seba-aln seba-aln force-pushed the experiment/expose-cypher-method branch from e873982 to aa0369c Compare April 26, 2023 13:14
@seba-aln seba-aln marked this pull request as draft May 9, 2023 07:45
@seba-aln seba-aln force-pushed the experiment/expose-cypher-method branch from 5802f8a to c541138 Compare June 13, 2023 18:03
@seba-aln seba-aln force-pushed the experiment/expose-cypher-method branch from c541138 to 7c6e789 Compare July 4, 2023 11:47
@seba-aln seba-aln marked this pull request as ready for review July 4, 2023 11:58
@seba-aln seba-aln changed the title Experiment - Add support for switching cipher methods Add support for switching cipher methods Jul 4, 2023
Copy link

@kleewho kleewho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seba-aln
Copy link
Contributor Author

seba-aln commented Jul 6, 2023

This is potentially a breaking change

If you use multiple clients, enabling AES.GCM will break other clients that have not enabled this because they will not be able to decipher the messages.

If the python SDK is the only one in use, there should not be any problems since history messages can be deciphered by a fallback algorithm.

Configuration

Nothing has to be changed for this to work with other SDKs without breaking compatibility. If, however, you wish to enable GCM ciphering, use the example below:

from Cryptodome.Cipher import AES
...
config = PNConfiguration()
config.cipher_mode = AES.MODE_GCM
config.fallback_cipher_mode = AES.MODE_CBC

@seba-aln
Copy link
Contributor Author

seba-aln commented Jul 6, 2023

@pubnub-release-bot release

@seba-aln seba-aln merged commit 1029e22 into master Jul 6, 2023
10 checks passed
@seba-aln seba-aln deleted the experiment/expose-cypher-method branch July 6, 2023 09:44
@pubnub-release-bot
Copy link
Contributor

🚀 Release successfully completed 🚀

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.

None yet

4 participants