You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@tsfile.apache.org by "zhujt20 (via GitHub)" <gi...@apache.org> on 2025/06/19 07:58:20 UTC

[PR] generate main key [tsfile]

zhujt20 opened a new pull request, #519:
URL: https://github.com/apache/tsfile/pull/519

   add save_encrypt_key option and the salt information


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@tsfile.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] generate main key [tsfile]

Posted by "jt2594838 (via GitHub)" <gi...@apache.org>.
jt2594838 merged PR #519:
URL: https://github.com/apache/tsfile/pull/519


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@tsfile.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] generate main key [tsfile]

Posted by "jt2594838 (via GitHub)" <gi...@apache.org>.
jt2594838 commented on code in PR #519:
URL: https://github.com/apache/tsfile/pull/519#discussion_r2156403132


##########
java/tsfile/src/main/java/org/apache/tsfile/common/conf/TSFileConfig.java:
##########
@@ -156,11 +156,17 @@ public class TSFileConfig implements Serializable {
   private CompressionType compressor = CompressionType.LZ4;
 
   /** encryptKey, this should be 16 bytes String. */
-  private byte[] encryptKey = "abcdefghijklmnop".getBytes(TSFileConfig.STRING_CHARSET);
+  private byte[] encryptKey = EncryptUtils.generateSalt();

Review Comment:
   This is confusing. Is it necessary to initialize it here?



##########
java/tsfile/src/main/java/org/apache/tsfile/common/conf/TSFileConfig.java:
##########
@@ -156,11 +156,17 @@ public class TSFileConfig implements Serializable {
   private CompressionType compressor = CompressionType.LZ4;
 
   /** encryptKey, this should be 16 bytes String. */
-  private byte[] encryptKey = "abcdefghijklmnop".getBytes(TSFileConfig.STRING_CHARSET);
+  private byte[] encryptKey = EncryptUtils.generateSalt();
 
   /** Data encryption method, default encryptType is "UNENCRYPTED". */
   private String encryptType = "UNENCRYPTED";
 
+  /** Salt for encrypt, this should be 16 bytes String. */
+  private byte[] encryptSalt = EncryptUtils.generateSalt();
+
+  /** Whether to save encrypt key in IoTDB, default value is false. */
+  private boolean saveEncryptKey = false;

Review Comment:
   This should be put into IoTDB.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@tsfile.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org