The Mariadb page that talks about this is: https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/.

Looks to me like there are set of encryption files that are read at startup by some kind of utility that comes with Maria. Perl wouldn't have a role in that part. If you configure the DB to encrypt all files, looks like the DBI wouldn't know or care about that. However the default is to decide encryption on a table by table basis with some additional parms to CREATE TABLE or ALTER. Something like: CREATE TABLE T (id int, value varchar(255)) ENCRYPTED=YES ENCRYPTION_KEY_ID=17;. Whether or not these extra SQL parms work with the current DBI, I don't know. Sorry that I can't help further. It was an interesting question and I learned a bit of new stuff.

update: Oh, you need MariaDB 10.1.4. Looks like once tables are created, this is pretty much transparent to the user except for a 3-5% performance hit, which is less than I would have thought. you write "My limited understanding is that you provide certain credentials (keyfile) at login", it appears that the key file is read by the DB when it starts, not supplied dynamically on a per login or connection basis. This at rest encryption just ensures that as long as you keep the keyfile and dbfile separate (presumably on different HD's or computers), even having the dbfile gets you nowhere. There is no protection from SQL injection attacks or unauthorized users. This protects against somebody who has access to the file system and could make a copy of the dbfile.


In reply to Re^3: DBD::mysql to MariaDB with at rest encryption by Marshall
in thread DBD::mysql to MariaDB with at rest encryption by gwhite

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.