updateMasterKey

Description

Updates the primary key. The working key is derived from the primary key. Therefore, updating the primary key also updates the working key.

After the primary key is updated, the old primary key can still be used for decryption, and the new primary key is used for encrypting new input data.

Syntax

./seceasy_encrypt --updateMasterKey domainId domainCount aheadDays cipherTextFilePath
  • This command must be executed in the {MindIE installation directory}/latest/mindie-service/bin directory.
  • When the primary key is updated, a new primary key is added. The encrypted content is decrypted using the old key and encrypted using the new key, and then the old key is deleted. Currently, encrypted content can be stored only in one file.

Parameters

Parameter

Description

domainId

Domain ID. The value cannot be greater than the value of domainCount. The value is 1 for the current service.

domainCount

Number of domains. The value range is [2,1023]. The value is 2 for the current service.

aheadDays

Number of days to update the primary key before the primary key expires. The value range is [0, 1825] (1825 = 5 x 365, indicating five years).

cipherTextFilePath

Path of the encrypted file. The file stores the content encrypted using the primary key.