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

Add support for AES in EncryptionService #365

Open
martynaslawinska opened this issue Feb 12, 2021 · 5 comments
Open

Add support for AES in EncryptionService #365

martynaslawinska opened this issue Feb 12, 2021 · 5 comments
Labels
kind-enhancement Issue or PR is an enhancement to an existing functionality triaged Issue or PR is fully triaged
Milestone

Comments

@martynaslawinska
Copy link

jgomer2001 commented on Mar 9, 2020
Currently we support 3DES as cipher, usage will be considered disallowed after 2023.

See https://www.cryptomathic.com/news-events/blog/3des-is-officially-being-retired

According to draft guidance published by NIST on July 19, 2018, the Triple Data Encryption
Algorithm (TDEA or 3DES) is officially being retired

@smansoft
Copy link
Contributor

major change.
Changing this class (EncryptionService) will affect encrypting/decrypting Ldap Password from:
/etc/jans/conf/jans-ldap.properties.

Otherwise EncryptionService and StringEncrypter are internal parts of the project and they can be used in such ways for encrypting various strings, not only for Encrypting Ldap Password.

There are some ways for implementing AES support, including solving Symmetric Key:

  1. we can use standard PBKDF2 and correspondent implementing in Java and Python for generating keys.
    in this case we need to save
  • salt
  • user friendly (or random) password
  • iv
    in the file:
    /etc/jans/conf/salt
    salt and user friendly (or random) password will be used for generating symmetric key.
    StringEncrypter will receive: salt, user friendly (or random) password, iv (initial vector).
    Using implementing of PBKDF2, that use user friendly (or random) password and salt, key will be solved.
    Then this key and iv will be used for encrypting.
    In this case we will need add usage PBKDF2 and AES in python code (jans-setup).
  1. We can solve random salt (necessary length - 128/192/256 bits) and generate random iv and then save it into /etc/jans/conf/salt. During using AES we just receive salt and use it as symmetric key. iv is used as initial vector.

  2. Also we can save parameters, which define salt for every mode and key length:
    salt:alg:mode:lenght=salt
    passw:alg:mode:lenght=passw
    iv:alg:mode:lenght=iv

The main discussion questions:

  • should we use passw and salt (in this case we will use PBKDF2) or just salt (in this case salt is a key for AES)?

@yurem
Copy link
Contributor

yurem commented Oct 6, 2021

I think we need to replace deprecated 3DS with AES. We use this service to protect passwords in configuration files. We don't use it to protect data which we send over network. Hence this approach should be simple to allow implement it in Python/JS too.

@nynymike
Copy link
Contributor

I think @yurem is advocating for salt. If AES is sufficient today, let's keep it simple.

@smansoft
Copy link
Contributor

@shmorri

Why this Issue has status "To Be Assigned" ?

It's implemented but not merged yet:
https://github.com/JanssenProject/jans-auth-server/pull/265
and
https://github.com/JanssenProject/jans-setup/pull/74
.

@smansoft
Copy link
Contributor

@shmorri
I've changed the status.
Thanks.

@ossdhaval ossdhaval transferred this issue from another repository Jan 13, 2022
@ossdhaval ossdhaval added kind-enhancement Issue or PR is an enhancement to an existing functionality triaged Issue or PR is fully triaged labels Jan 13, 2022
@yuriyz yuriyz closed this as completed in fe07d76 Jan 26, 2022
@yurem yurem reopened this May 22, 2023
@yurem yurem added this to the 1.0.15 milestone May 23, 2023
@moabu moabu modified the milestones: 1.0.15, 1.0.16 Jul 12, 2023
@moabu moabu modified the milestones: 1.0.16, 1.0.17 Aug 2, 2023
@moabu moabu removed this from the 1.0.17 milestone Sep 18, 2023
@moabu moabu added this to the 1.0.18 milestone Sep 18, 2023
@moabu moabu modified the milestones: 1.0.18, 1.0.21 Nov 22, 2023
@moabu moabu modified the milestones: 1.0.21, 1.0.22 Dec 14, 2023
@moabu moabu modified the milestones: 1.0.22, 1.0.23 Feb 1, 2024
@moabu moabu modified the milestones: 1.1.0, 1.1.1 Mar 14, 2024
@moabu moabu modified the milestones: 1.1.1, 1.1.2 May 1, 2024
@moabu moabu modified the milestones: 1.1.2, 1.1.3 May 29, 2024
@moabu moabu modified the milestones: 1.1.3, 1.1.4 Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind-enhancement Issue or PR is an enhancement to an existing functionality triaged Issue or PR is fully triaged
Projects
None yet
Development

No branches or pull requests

6 participants