Add compatibility and flags variable to crypt header

XMLWordPrintableJSON

    • Storage Engines - Foundations
    • SE Foundations - 2026-01-16, SE Foundations - 2026-01-30
    • 1

      Having a discussion with Peter Macko, it is advised that we add minimum compatibility and flags variable to our existing crypt header.

      /*
       * WT_CRYPT_HEADER --
       *	Header for encryption key data.
       */
      WT_PACKED_STRUCT_BEGIN(__wt_crypt_header)
      /*
       * Signature 'wtch' (WiredTiger Crypt Header)
       */
      #define WT_CRYPT_HEADER_SIGNATURE 0x68637477u
          uint32_t signature; /* 00-03: Key header signature; always 'wtch' */
      #define WT_CRYPT_HEADER_VERSION 1u
          uint8_t version;     /* 04: Header version */
          uint8_t header_size; /* 05: Header size, in bytes */
          uint32_t crypt_size; /* 06-09: Payload size, in bytes */
          uint32_t checksum;   /* 10-13: Payload CRC32 checksum */
      WT_PACKED_STRUCT_END
      
      

      Problem Statement
      In the future, if we need to downgrade our customer, we need to check whether we can go to a lower crypt header version. The minimum compatibility version will provide us this information so we don't run into issues where we can't downgrade a customer.

            Assignee:
            Jie Chen
            Reporter:
            Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: