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

Symmetric encryption #192

Merged
merged 62 commits into from Nov 10, 2021
Merged

Symmetric encryption #192

merged 62 commits into from Nov 10, 2021

Conversation

ben-xD
Copy link
Contributor

@ben-xD ben-xD commented Oct 29, 2021

This PR closes #104

It adds symmetric encryption, please read the new documentation added to the README.

This PR will not yet work on iOS because it does not yet use the bug fix from Ably Cocoa: ably/ably-cocoa#1208 (I've tested this locally). A new version of Ably Cocoa needs to be released, and then Ably Flutter upgraded to the latest version (Ably Cocoa has a couple of small breaking changes fixable in less than 1 minute). I have confirmed that it works in Ably Flutter with this bug fix.

This PR does not yet include decryption of messages which are passed to PresenceMessage.fromEncoded and Message.fromEncoded, as per TP4 and TM3. This will be done in a separate PR #207, to keep this PR smaller.

… into bug/channel-options

# Conflicts:
#	lib/src/platform/src/codec.dart
#	lib/src/platform/src/realtime/realtime_channel.dart
- Handle setting ARTChannelOptions callback correctly, instead of crashing on iOS
- Encode and decode CipherParams if used on both Android and iOS
- Fix mistaken string constant usage (PlatformMethod.setRealtimeChannelOptions instead of Rest)
Temporarily remove cipher related code, to be re-added in a separate PR	4e54081	Ben Butterworth <24711048+ben-xD@users.noreply.github.com> 	27 Oct 2021 at 22:14
…/symmetric-encryption

# Conflicts:
#	lib/src/platform/src/rest/rest_channel.dart
#	lib/src/realtime/src/realtime_channel_options.dart
#	lib/src/realtime/src/realtime_channels_interface.dart
#	lib/src/rest/src/rest_channel_options.dart
@ben-xD ben-xD changed the base branch from main to bug/fix-runtime-crash-for-channel-options October 29, 2021 15:42
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc October 29, 2021 15:45 Inactive
Base automatically changed from bug/fix-runtime-crash-for-channel-options to main November 2, 2021 07:28
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 2, 2021 13:43 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 2, 2021 21:33 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 3, 2021 17:25 Inactive
- Put encoding/decoding in the right place on all 3 platforms (A/I/D)
- Remove cipherParamsStorage, opting to pass all data back to Dart side for iOS devices. Android devices still have handles
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 4, 2021 15:33 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 4, 2021 15:53 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 9, 2021 08:30 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 9, 2021 08:30 Inactive
@ben-xD ben-xD requested a review from lmars November 9, 2021 08:40
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 9, 2021 08:43 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 9, 2021 08:57 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 9, 2021 09:02 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 9, 2021 09:26 Inactive
@ben-xD ben-xD requested a review from tiholic November 9, 2021 10:18
@ben-xD ben-xD self-assigned this Nov 9, 2021
@ben-xD ben-xD added the enhancement New feature or improved functionality. label Nov 9, 2021
… into feature/symmetric-encryption

# Conflicts:
#	example/pubspec.lock
#	example/pubspec.yaml
@ben-xD ben-xD changed the base branch from main to enhancement/update-dependencies November 9, 2021 13:34
@github-actions github-actions bot temporarily deployed to staging/pull/192/dartdoc November 9, 2021 13:38 Inactive
Copy link
Contributor

@tiholic tiholic left a comment

Choose a reason for hiding this comment

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

Everything looks good to me. One minor optimization w.r.t. dart code:

lib/src/platform/src/platform.dart Show resolved Hide resolved
Base automatically changed from enhancement/update-dependencies to main November 9, 2021 15:32
@ben-xD ben-xD merged commit 9f67171 into main Nov 10, 2021
@ben-xD ben-xD deleted the feature/symmetric-encryption branch November 10, 2021 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality.
Development

Successfully merging this pull request may close these issues.

Symmetric Encryption
5 participants