Repository navigation
【早期结果】图案本身就存着数据:一张 DVD-R 上的玫瑰图,同时存了 1.38 GB,整盘读回零错误 / [Early result] The picture itself holds the data: a rose picture on a DVD-R with 1.38 GB stored in it, read back with no errors #170
Ashley-QwQ
started this conversation in
展示台 Show and tell
Replies: 2 comments 8 replies
|
我想以此总结下,是不是这样,想出这几种同时有图案与数据的方法,有不对请纠正:
|
5 replies
|
有关 #170 (comment) 中的2,在把unconstrained部分存其他数据,但同时图片透明底上是有图案的,dvd从内向外一圈一圈读,就是交错的数据。要恢复这些数据我觉得是一定要知道一些东西的,比如制作dis iso使用的原图,轨道参数这些,才能知道哪些地方是图案哪些是unconstrained数据才能抽出来还原数据。 但其实今天我又想到了一个更加直接简单的方法。dis iso中按说Q域中只有0x92跟0xa5,剩下的就是一些随机数据(对应图片透明底)。当然采取 #90 的一个workaround后,还会出现0x9b这个值。所以,只要把要存的数据中的0x9b 0x92 0xa5这三个字节通过转义全消掉不要出现,再直接填充dis iso中不是0x9b 0x92 0xa5这三个字节的空间(基本上就是透明区域,虽然dis填充的随机数据中也会出现0x9b 0x92 0xa5什么的但非常非常少量)。 解码就是把光盘数据读一遍,读出的内容中的0x9b 0x92 0xa5全删去,剩下的数据就是转义后的用户存的数据,去转义就能恢复到原数据。 代码已经实现在,https://github.com/bczhc/dvd-tools/blob/7f4d7aa0307bae11cf5050ee90a80696d80d4136/src/bin/dvd-hide.rs#L4-L6 且我已经在DVD+RW上测试了一遍,在艺术ISO里嵌入了一个1G多的文件,然后烧录再读取再提取,两者是一样的。 转义表所用的是: |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
想让一张盘上既有图又有文件,我们见过的做法都是给文件单独留位置:放在内圈或外圈,放在图的空白处(#96),或者放到双层盘的另一层(#59)。刻图的地方只负责显示图案。
这张盘不分开放:图案区里约七成的地方,本身既是画面也存着数据,一共 1.38 GB,约为一张普通 DVD 容量的三成。整张盘读回来零错误,存进去的数据全部原样恢复。盘上还存了 3 份原图,也都完整恢复了。
这是用一张盘、一台光驱做的早期结果,局限都写在后面。
左边是照片,中间是刻录用的设计图,右边是这张盘上哪里存了数据。绿色的地方存着数据:玫瑰的暗部,以及上下两块只有明暗的区域。带颜色的小格和外圈彩虹边不存数据。图案区里约七成的地方带数据。照片里的颜色是另一项实验,单独写在 #168。
图和数据怎么放在一起
就像写一句话时可以在同义词之间挑一个:意思不变,但挑了哪个词,本身就可以是暗号。
在光盘上也一样。让一块地方显得暗,有很多种写法,看起来差不多。我们挑了 16 种暗的写法和 16 种亮的写法。从 16 种里选一种,相当于每个字节藏 4 bit。
所以明暗基本不变,数据就藏在“选了哪一种”里。读的时候,光驱照常读盘,再由一个小程序把这些选择翻译回原来的数据。
能存多少
这张盘上,带颜色的小格和外圈的彩虹边不存数据,所以比估算的少。
还没做到的
更早的讨论:图像和数据共存 #150。
具体实现
程序还没发布,下面是它现在的做法。
geo测出这种盘的螺旋参数(u = 180518.44,v = 5.5912),这样就知道每 16 个字节落在盘面的哪里(沿轨约 34 µm)。5F环,56.0 到 57.6 mm 是A5环。外圈从 LBA 约 1,945,558 开始,所以外圈不带数据。62 63 65 67 70 74 75 9C A2 A8 B1 B4 B6 E1 E7 EE。亮写法 16 种:5C 7A 7C 86 88 8A 8B 8D 93 95 96 97 9A D2 D5 D7。按 EFMPlus 码字的跳变数挑选,暗的每 16 位平均 4.55 次跳变,亮的 2.73 次。两组不相交,也和彩色纹理、彩虹边的字节分得开。RSD1魔数、8 字节流偏移、2 字节长度、4 字节 CRC32,共 18 字节头,后面是这段数据。数据流前面放原图,256 MiB 和 512 MiB 处再各放一份,其余是可复现的测试数据。这张盘的字节占比:暗写法 47.5%,亮写法 11.4%,彩色纹理 25.8%,
5F6.4%,A58.9%。技术细节
A5外圈),没有超过 2% 的块。这是模型值,不是实测的读取余量。mix1盘的扫描,SHORT/LONG约 0.75 到 0.86,A5/92约 0.67 到 0.77。Implementation (English)
The program isn't published yet. This is what it does now.
geogives the spiral of this disc type (u = 180518.44,v = 5.5912), so we know where each 16 bytes land on the disc (about 34 µm along the track).5Fring, 56.0 to 57.6 mm anA5ring. The rings start at about LBA 1,945,558 and hold no data.62 63 65 67 70 74 75 9C A2 A8 B1 B4 B6 E1 E7 EE. Light:5C 7A 7C 86 88 8A 8B 8D 93 95 96 97 9A D2 D5 D7. They're picked by transitions in their EFMPlus code words: on average 4.55 per 16 bits for dark and 2.73 for light. The sets don't overlap each other, and they can be told apart from the texture and ring bytes.RSD1magic, 8-byte stream offset, 2-byte length and 4-byte CRC32, 18 bytes in all, then the data. The stream starts with the original picture, with more copies at 256 MiB and 512 MiB. The rest is reproducible test data.Share of bytes on this disc: dark 47.5%, light 11.4%, coloured textures 25.8%,
5F6.4%,A58.9%.English
To get both a picture and files on one disc, the approaches we've seen give the files their own place: the inner or outer ring, the blank parts of the picture (#96), or the other layer of a dual-layer disc (#59). The area with the picture just shows the picture.
This disc doesn't keep them apart. About 70% of the picture area is both picture and data: 1.38 GB, about 30% of a normal DVD. The whole disc read back with no errors, and all the data came back exactly as written. The disc also stores 3 copies of the original picture, and all 3 came back intact.
This is an early result from one disc and one drive. The limits are listed below.
The images above are a photo, the design we burned, and a map of where the data is. The green areas store data: the dark parts of the roses, plus the top and bottom areas that only show light and dark. The coloured cells and the rainbow edge don't. About 70% of the picture area holds data. The colours in the photo are a separate experiment: #168.
How the picture and data fit together. Think of choosing between synonyms when you write a sentence. The meaning stays the same, but which word you chose can itself be a code. On a disc, there are many ways to write a spot that look about equally dark. We picked 16 ways for dark and 16 for light. Choosing one of 16 hides 4 bits in each byte. So the light and dark stay about the same, and the data is in which one we chose. To read it, the drive reads the disc as usual, then a small program turns those choices back into the original data.
How much it holds.
On this disc the coloured cells and the rainbow edge store no data, which is why it holds less than the estimates.
What it can't do yet.
Earlier discussion: picture and data #150. The numbers are in the technical details above.
All reactions