Skip to content

Cross-platform text editor with cryptographic features in C# and bouncyCastle crypto library

License

Notifications You must be signed in to change notification settings

lockejan/secure-text-editor

Repository files navigation

NOTE: because the used frontend library is still closed source at this point, only the backend (in BcFactory) is in a reproducable state.

secure-text-editor

Implementation of a basic text editor with security features in C# which can save and load it's own encrypted files or any other basic text file.

All cryptographic functionality was used with bouncyCastle crypto library.

The used cross-plattform UI library medja has been provided by SprintWORX GmbH.

Under the hood medja uses OpenTK and SkiaSharp and has been created as a lightweight cross-plattform UI library especially for embedded systems applications. This project is some sort of prototype test in an different environment. Therefore it's not fully optimized for this use case but still feature-rich enough to run as a basic editor under Linux, OSX and Windows.

At the time of creating this project openTK haven't been ported to a current dotNet standard. Therefore the secure-text-editor runs with the mono runtime.

As said before medja isn't an open source project right now but might be in the future. Till then it's not possible to build the project without a private feed. However due to the design of the secure-text-editor project it's easy to use a different UI framework or library and just make use of the crypto backend.

Main view

The project currently provides the following cryptographic options:

Cipher Keysize
AES 128 / 192 / 256 bit
RC4 40 - 2048 bit
Blockmode
ECB
CBC
OFB
Padding
NoPadding
PKCS7
ZeroByte
PBE (Password based encryption) cipher
PBKDF2
SCRYPT
Digital Signing (creation and verification)
SHA256 with DSA
Digest and MACs
SHA256
AESCMAC
HMACSHA256

Manipulations on files which are using integrity options (e.g. DSA, Digest or MAC) are recognized by the editor on load.

Save view

Load view

The editor stores text files in a json file format:

{
  "FormatVersion": "0.1",
  "Encoding": "System.Text.UTF8Encoding",
  "IvOrSalt": null,
  "Signature": null,
  "Cipher": "1irNqq2d6jX/PDGoNqBvAg==",
  "IsEncryptActive": true,
  "CipherAlgorithm": "AES",
  "KeySize": 128,
  "BlockMode": "ECB",
  "Padding": "Pkcs7",
  "IsPbeActive": false,
  "PbeAlgorithm": "PBKDF2",
  "PbeDigest": "GCM",
  "IsIntegrityActive": false,
  "Integrity": "Digest",
  "IntegrityOptions": "Sha256"
}

There is also some sort of code documentation via doxygen. To create it, cd to the project root and execute doxygen via CLI. (Doxygen looks for it's config file in the current directory if not specified.)

About

Cross-platform text editor with cryptographic features in C# and bouncyCastle crypto library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages