Encrypt version: 8.x-3.0-alpha2+2-dev
Key version: 8.x-1.3
Drupal version: 8.2.7
Aegir environment
For the life of me, I must have done something stupid. I added a key (Key module) but then I pull up Encryption profiles (Encrypt module) and tried to add a new profile, no Encryption Keys are available in the dropdown. Even if I add a key from the Encryption profile screen link, the Encrypt prompt still doesn't recognize it. If it makes a difference, the key I added was ":authentication" using File as the Key provider. I installed both modules manually, but also ran composer after the download. No difference before or after composer. I've been trying to install the Real AES module and have been having composer issues, but I don't think that's related to this issue. Any ideas?

Comments

dwork created an issue. See original summary.

rlhawk’s picture

Perhaps you've already figured this out, but Encrypt only supports encryption keys, not authentication keys.

dwork’s picture

Status: Active » Closed (works as designed)

Thank you, that did the trick.

AaronBauman’s picture

Title: No keys displayed » Add help text when no encryption keys are available
Category: Support request » Feature request
Status: Closed (works as designed) » Active

I have set up this module a half dozen times now, and each time i forget the specific settings for a key that's usable by encrypt module.

First, i set up an auth key, instead of an encryption key.
Second, i created a 128bit key, but Real AES requires a 32byte key.
Why did encrypt suggest an invalid key?

Is it possible to write help text that more completely describes how to set up a key to create an encryption profile?
Maybe even provide a utility to generate a key suitable for use with the given encryption method?

Cellar Door’s picture

I've created a patch that does something similar for encryption methods. The issue here with the key dropdown is the form element is created and managed by the Key module so I don't think it would be a patch to Encrypt to do it. I do agree that the help text could be better for encryption so people are led to create a key of the right type/size.

I'll also look to create a page in the help docs around how to use the key module for Encrypt specifically and what size/type of keys to create (those are up to the encryption method finally though).

The issue with giving a key creation method is randomness. Creating a key needs to be done through a service that has provably random output. We could use the Crypt utility in core to create one: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Util... but I'd possibly caveat it. Either way that's a patch to the key module and not to Encrypt so we can discuss it there I think.