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

Support encryption #33

Open
psamim opened this issue Mar 2, 2021 · 9 comments
Open

Support encryption #33

psamim opened this issue Mar 2, 2021 · 9 comments
Labels
enhancement New feature or request

Comments

@psamim
Copy link

psamim commented Mar 2, 2021

Hi,

As an enhancement, it would be great if Orgro could support opening encrypted files, or encrypted headings, with the help of OpenKeyChain. Just like Emacs and org-mode.

@amake
Copy link
Owner

amake commented Mar 2, 2021

It looks like OpenKeychain is Android-only.

As a general principle Orgro is cross-platform and I won't be adding any single-platform features. So I would need to find an equivalent implementation for iOS or, better yet, in Dart.

@amake amake added the enhancement New feature or request label Mar 2, 2021
@chrstfer
Copy link

I don't know dart, but this looks like an actively maintained library that does encryption and here's a gist with a reference implementation.

@amake
Copy link
Owner

amake commented May 4, 2021

I take it that this request is to support the whole-file and per-section use cases described here:

pointycastle looks too low-level. Something more like openpgp or encrypt looks like the right thing.

I would also need to create a GUI for managing private keys.

amake added a commit that referenced this issue Oct 28, 2022
```
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during a scheduler callback:
Layer OffsetEngineLayer was previously used as oldLayer.
Once a layer is used as oldLayer, it may not be used again. Instead, after calling one of the
SceneBuilder.push* methods and passing an oldLayer to it, use the layer returned by the method as
oldLayer in subsequent frames.
'dart:ui/compositing.dart':
Failed assertion: line 110 pos 9: '<optimized out>'

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

When the exception was thrown, this was the stack:
#2      _EngineLayerWrapper._debugCheckNotUsedAsOldLayer (dart:ui/compositing.dart:110:9)
#3      SceneBuilder.addRetained.<anonymous closure>.recursivelyCheckChildrenUsedOnce (dart:ui/compositing.dart:695:21)
#4      List.forEach (dart:core-patch/growable_array.dart:416:8)
#5      SceneBuilder.addRetained.<anonymous closure>.recursivelyCheckChildrenUsedOnce (dart:ui/compositing.dart:701:18)
#6      SceneBuilder.addRetained.<anonymous closure> (dart:ui/compositing.dart:704:7)
#7      SceneBuilder.addRetained (dart:ui/compositing.dart:707:6)
#8      Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:671:15)
#9      ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#10     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#11     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#12     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#13     ClipRectLayer.addToScene (package:flutter/src/rendering/layer.dart:1590:5)
#14     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#15     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#16     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#17     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#18     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#19     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#20     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#21     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#22     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#23     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#24     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#25     TransformLayer.addToScene (package:flutter/src/rendering/layer.dart:1914:5)
#26     ContainerLayer.buildScene (package:flutter/src/rendering/layer.dart:1097:5)
#27     RenderView.compositeFrame (package:flutter/src/rendering/view.dart:231:37)
#28     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:514:18)
#29     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:869:13)
#30     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:375:5)
#31     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1271:15)
#32     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1200:9)
#33     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1058:5)
#34     _invoke (dart:ui/hooks.dart:145:13)
#35     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:338:5)
#36     _drawFrame (dart:ui/hooks.dart:112:31)
(elided 2 frames from class _AssertionError)
════════════════════════════════════════════════════════════════════════════════════════════════════
```
amake added a commit that referenced this issue Dec 24, 2023
amake added a commit that referenced this issue Dec 24, 2023
amake added a commit that referenced this issue Dec 24, 2023
amake added a commit that referenced this issue Dec 24, 2023
amake added a commit that referenced this issue Dec 24, 2023
@amake
Copy link
Owner

amake commented Dec 27, 2023

Support for decrypting and reencrypting Org Crypt-style symmetrically encrypted sections will be available for testing in v1.36.0 soon:

@amake
Copy link
Owner

amake commented Jan 4, 2024

Support for symmetrically encrypted sections is now available on all platforms in v1.36.1.

I'm debating whether it's worthwhile to support asymmetric encryption and full-file encryption.

@amake
Copy link
Owner

amake commented Jan 4, 2024

I'm leaning toward not bothering with full-file encryption. I started a poll about symmetric vs. asymmetric: https://mastodon.social/@amake/111700198262236731

@amake
Copy link
Owner

amake commented Jan 8, 2024

From discussion on Mastodon I understood that using OpenKeychain would have important advantages:

  • I don't have to worry about securely storing the private keys because OpenKeychain handles that for me
  • It also apparently supports NFC cards (like Yubikeys?)

Those are nice advantages, but there are some significant issues:

@amake
Copy link
Owner

amake commented Jan 9, 2024

iPGMail offers an API for usage similar to OpenKeychain's intents:
https://ipgmail.com/developers/

@amake
Copy link
Owner

amake commented Jan 9, 2024

The OpenKeychain API appears to be this:
https://github.com/open-keychain/openpgp-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants