How to use "--encryption-module= " with own crypto program?

In the documentation it says that Duplicati can use plugin encryption-modules, which is awesome! But I couldn’t find technical information on exactly how this works.

If I want to use my own crypto program that supports encrypt and decrypt on the cli, how can I use it with Duplicati?

Do you have a link? Possibly you’re using similar words. Duplicati says “pluggable” or sometimes “plugable”, as a typo. I’m not familiar with technical details, but I don’t think it’s an easy user thing.

–encryption-module

Duplicati supports pluggable encryption modules.

C:\ProgramData\Duplicati\duplicati-2.0.5.1_beta_2020-01-18>Duplicati.CommandLine.exe help encryption

Duplicati offers various options for the used compression and encryption
modules.

  --encryption-module = aes, gpg
    The encryption module that is used to encrypt backups. Default is aes.
  --compression-module = zip, 7z
    The compression module that is used. Default is zip.
  --enable-module = console-password-input, mssql-options, hyperv-options,
    http-options, sendhttp, sendmail, runscript, sendxmpp, check-mono-ssl
    Enable a built-in generic module that is not enabled by default
  --disable-module = console-password-input, mssql-options, hyperv-options,
    http-options, sendhttp, sendmail, runscript, sendxmpp, check-mono-ssl
    Disable a built-in generic module that is enabled by default
  --passphrase
    Supply a passphrase that Duplicati will use to encrypt the backup volumes,
    making them unreadable without the passphrase. This variable can also be
    supplied through the environment variable PASSPHRASE.
  --no-encryption = false
    If you store the backups on a local disk, and prefer that they are kept
    unencrypted, you can turn of encryption completely by using this switch.



C:\ProgramData\Duplicati\duplicati-2.0.5.1_beta_2020-01-18>

I think some of the above is dynamically built from information in the dynamic loader and its modules.

I doubt there is any beyond existing source code (and comments) as examples for code you will write.

Developer documentation

It is intended to serve as an overview document for users and developers looking to find out where a certain feature is implemented or could be implemented.

The core library relies on dynamically loaded libraries that implement plugable components. The plugable components currently includes: backends, compression, encryption, and generic modules.

https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Encryption/GPGEncryption.cs
is an example you can start from. You can see it’s an EncryptionBase which implements IEncryption.

I suspect it’s been a very long time since a pluggable encryption module was written. Might be here.
Good news, though, is someone figured out (without help?) Add Tardigrade as new Backend #4197.

1 Like