有没有办法验证元数据?

发布于 2024-09-12 05:15:38 字数 108 浏览 3 评论 0原文

我只是在思考,我想知道 - 我们如何知道文件的元数据是正确的?如果某个程序修改了它怎么办?我们没有关于元数据本身的实际数据,因此我们无法验证其有效性?或者我们呢?我们可以使用任何方法/程序来验证它们吗?

I was just doing some thinking and I was wondering to myself - How do we know the metadata of a file is correct? What if some program modifies it? We have no actual data about the metadata itself and thus we would have no way of verifying its validity? Or do we? Are there any methods/programs we can use to validate them?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

允世 2024-09-19 05:15:38

如果您想知道元数据是否有效,请让您信任的人对其进行签名并将签名附加为元数据。这样,您就可以通过验证签名来知道它是否被篡改。

请参阅 DKIM 电子邮件签名系统。它被设计为去中心化的,并且可以容忍对消息标头的一些更改,而不会使签名完全无效(如果需要的话)。

If you want to know that metadata is valid, have something you trust sign it and attach the signature as metadata. That way, you can know if it has been tampered with by validating the signature.

See the DKIM email-signing system. It's designed to be decentralized and can tolerate some changes to a message's headers without invalidating the signature completely (if so desired).

不弃不离 2024-09-19 05:15:38

我们如何知道文件的元数据是否正确?如果某个程序修改了它怎么办?

我更具体地说是操作系统级元数据,例如创建日期、访问日期、文件大小

。这个问题是似是而非的。操作系统级元数据不可能是“错误的”。

如果访问“错误”?谁说什么是“错误”?如果系统管理员更改了权限,而您无法访问它,那么 - 好吧 - 你运气不好,但访问就是访问。谁来定义“错误”?

如果尺寸“错误”?您可以通过写入来更改文件的大小。要么你信任操作系统来处理这个问题,要么——好吧——你会得到另一份工作,在那里你可以担心诸如时间不工作、重力不工作以及操作系统不跟踪资源之类的事情。

如果创建日期“错误”?没有 API 可以更改此设置,因此您必须信任操作系统来维护此设置。

如果您担心超级复杂的类似病毒的软件可以秘密覆盖操作系统中的 inode 和 dnode,那么您遇到的问题比“元数据”更大。您的操作系统有病毒损坏。

How do we know the metadata of a file is correct? What if some program modifies it?

I am more specifically talking about OS-level metadata, such as creation date, access date, file size

The question is specious. OS-level metadata can't be "wrong".

If the access is "wrong"? Who says what's "wrong"? If the sysadmin changed the permissions, and you can't access it, then -- well -- you're out of luck, but the access is the access. Who defines "wrong"?

If the size is "wrong"? You change the size of a file by writing to it. Either you trust the OS to handle this, or -- well -- you get another job where you can worry about things like time not working, gravity not working, and OS not keeping track of resources.

If the creation date is "wrong"? There's no API to change this, so you have to trust the OS to maintain this.

If you're worried about super-complex virus-like software that can covertly overwrite inodes and dnodes in the OS, you have a bigger problem than "metadata". You have a virus corrupting the OS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文