Is it possible to intercept a matlab save() bytestream

前端 未结 10 2389
暖寄归人
暖寄归人 2020-12-09 22:50

In matlab it is possible to write matlab objects, or even the entire workspace, to a file using the matlab save() call. I would like to intercept the bytestream and postproc

10条回答
  •  无人及你
    2020-12-09 23:23

    Your best bet is probably to write the mat file to a tmpfs/ramdisk and then encrypt it before saving it to disk. You sacrifice portability and rely on the OS to provide secure virtual memory, but if you can't even trust the local disk, you're probably not going to be able to achieve satisfactory security.

    By the way, why exactly are you unable to trust the local disk at all, even to the extent that you can't put your temporary file in a directory with permissions set to only allow access for the user owning the matlab process (and root)? Are you trying to implement a DRM system?

提交回复
热议问题