Legacy Knowledge Base
Published Jul. 2, 2025

Does the Encryption Key that is generated per company id for the Liferay Installation ever change?

Written By

Ryan Snuggs

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Does the Encryption Key that is generated per company id for the Liferay Installation ever change?

Environment

  • Liferay 7.2

Resolution

  • The following portal properties will alter the encryption key for a Liferay installation:
#
# Set this to the appropriate encryption algorithm to be used for company
# level encryption algorithms (except password encryption which is defined
# via the property "passwords.encryption.algorithm").
#
# If you change this setting, you may need to also change the property
# "company.encryption.key.size" to configure the desired encryption key
# size.
#
# For more details about encryption keys, see the Java Cryptography
# Extension documentation.
#
# Env: LIFERAY_COMPANY_PERIOD_ENCRYPTION_PERIOD_ALGORITHM
#
company.encryption.algorithm=AES
#company.encryption.algorithm=Blowfish
#company.encryption.algorithm=DES
#company.encryption.algorithm=DESede #
# Set this to define the size used for the company wide encryption key. If
# you change this setting, you may need to also change the property
# "company.encryption.algorithm" to ensure the algorithm supports your key
# size. Most encryption algorithm implementations do not support key sizes
# stronger than 128. Only those with unlimited strength cryptography support
# stronger keys.
#
# For more details about supported key sizes for encryption keys, see the
# Java Cryptography Extension documentation.
#
# Env: LIFERAY_COMPANY_PERIOD_ENCRYPTION_PERIOD_KEY_PERIOD_SIZE
#
#company.encryption.key.size=56
company.encryption.key.size=128
#company.encryption.key.size=168
#company.encryption.key.size=256
#company.encryption.key.size=384
#company.encryption.key.size=512

If the above properties are not altered, then the encryption key the Liferay installation will not change.

 

 

Did this article resolve your issue ?

Legacy Knowledge Base