手把手教你破解HDCP Key

HDCP技术是由好莱坞与半导体界巨人Intel合作开发,保护未经压缩的数字音视频内容,适用于高速的数字视频接口(Displayport、HDMl、DVI),内容加扰实现保护。HDCP设计为内容消费链中的最后一个环节,从内容源设备到显示设备,HDCP不允许完全内容拷贝行为,即拷贝控制信息CCl只有禁止拷贝状态。在系统更新方面,HDCP采用吊销列表来屏蔽已经被窃取的设备私钥

HDCP用于保护“线路上的”高清晰数字视频信号,例如你的DVD播放器和电视机之间的线路。HDCP做两件事情:加密传输的数据使得(明文)无法被捕获;允许两个终端节点验证对方是不是HDCP授权的设备。从安全角度来说,HDCP关键的一步是刚开始(两个设备之间)的握手阶段(译注:指建立连接),在这一步双方建立一个共享的密钥来加密通信内容,同时可以相互验证对方是不是HDCP授权的。

高清视频信号是一种典型的可以从一个系统传输到DVI\HDMI接口的信号。这些接口能保证传递的视频图像保持原本的质量,因此可以获得更多的终端用户,但对于企业来说,同时会出现更多没有经过授权和非法复制传输的风险。

传统的知识版权保护技术仅仅能够保护已经存储在某种介质上的数据,但是高清视频信号仍然能够通过DVI\HDMI之类的数字接口进行传输,为了解决这个问题,HDCP就应运而生。HDCP是一个基于数据加密和授权验证的内容保护系统

HDCP主要包含三个基本内容:校验协议、像素加密和可更新性。首先,发送器验证接收设备是否被授权接收加密数据,是通过校验协议来检验接收器接收数据信息的合法性。发送器和接收设备相互交换一个40位的密钥选择矢量(KSV),收发双方将获得的KSV和自己的私有密钥进行各自独立的运算,运算的结果进行对比,若二值相等则发射端就能确定此接收器为HDCP适合接收者。

若通过前一阶段的合法性校验通过后,发送器与接收器在校验协议部分交互共享密钥,完成数据加密和解密过程。发送器的加密是通过对24-bit原始像素数据和由HDCP加密器产生的24-bit加密数据进行“异或”运算得到24bit加密像素数据。接收器端接收到加密像素数据后与接收器HDCP加密器加密后的24-bit加密数据再进行“异或”运算。由于接收器HDCP加密器的结构和初始值与发送器HDCP加密器完全相同,所以经过两次“异或”运算还原加密数据。

当需要取消接收器的合法性时,通过HDCP的可更新性来完成。这一部分HDCP识别和取消未经授权或其KSV已经被放“撤销列表”的设备。避免了由于合法HDCP接收器的私有设备密钥和KVS由于某种原因被泄露而造成有版权信息被非法盗用。

HDCP接收端有2个通信模块:HDCP发送端位于HDMI\DVI接收端芯片的外部;而接收端位于HDMI\DVI接收端芯片的内部。

HDCP发送端通过I2C总线发送授权认证信号给接收端。HDMI接收端接口通过HDCP控制寄存器的更新来发出操作指令,从而控制HDCP接收端的状态,以及提供必要的信息HDCP接收端知道工作在视频传输的阶段,从HDMI接口接收到解密信息并发送回去。

HDCP接收端由4个模块组成:I2C从机接口,控制寄存器,HDCP控制器以及数据加密机。当打包数据或视频数据是逻辑高电平时,数据从HDMI输入到HDCP接收端的解密才有效。数据的输入与输出必须在2个时钟周期内完成。HDMI只有在这个时间内才能够接收到数据。

1、数据加密机

数据加密是为了将数字内容进行加密,防止不合法的传输和复制,它是内容保护的核心逻辑模块。HDCP加密好的数据是由HDCP加密机产生的24位伪随机数据流与HDCP保护内容的数据按逐位异或的结果。HDCP加密是一种能同时为身份授权认证和高速传输非压缩视频数据的特殊加密设计。

2、HDCP控制器

HDCP控制模块控制HDCP接收端的所有操作,它通过个状态机来实现以下功能:

(1)HDCP接收端的状态的控制。

(2)计算Km值,HDCP接收端把Key存储到控制器中。

(3)接收端授权认证状态的转换。

(4)HDCP加密状态的转换:OESS,EESS,两种加密方式。

3、控制寄存器

当HDCP接收端是第一连接器件时,控制寄存器根据HDCP协议中定义的,除了0x20~0x30,0x43地址位,这些是HDCP中继器的控制寄存器;当HDCP接收端是第二连接器件时,仅仅是控制寄存器的子集才允许进入的。IPC接口子模块会发出一个从HDMI接收端接口连接到第一还是第二的指示信号。

4、I2C从机接口

HDCP里面定义I2C作为控制通道接口。有3种操作模式:读(read)、写(write)和短读(short read)。读与短读之间的区别是看读取数据过程是在Start(S)还是Repeated Start(RS)条件下初始化的。在短读模式中,在实际的读操作前不需要写入寄存器的偏移地址。

在此HDCP接收端里面必须有一个能够支持IPC总线的逻辑器件。IPC与第一连接器件的8位的二进制的地址是0111010x;或者是16进制的0×74作为IPC地址,读写位置零。与第二连接器件的地址是0x76。I2C从机接口逻辑在决定与控制寄存器的哪部分连接根据HDCP发送端指示的从机地址来确定。

每个支持HDCP的设备都必须拥有一个独一无二的HDCP密钥(Secret Device Keys),密钥由40组56bit的数组密码组成。HDCP密钥可以放在单独的存储芯片中,也可以放在其他芯片的内部,例如,ATl和Nvdia(世界两大著名显卡主芯片供应商)完全可以将它们放入显示芯片中。每一个有HDCP芯片的设备会拥有一组私钥(Device Private Key),一组私钥将会组成KSV(Key Selection Vector)。KSV相当于这台拥有HDCP芯片设备的ID号。HDCP传输器在发送信号前,将会检查传输和接受数据的双方是否是HDCP设备,它利用HDCP密钥,让传输器与接收端交换,这时双方将会获得一组KSV并且开始进行运算,其运算的结果会让两方进行对照,若运算出来的数值相符,该传输器就可以确认该接收端为合法的一方。传输器确定了接收端符合要求,传输器便会开始进行传输讯号,不过这时传输器会在信号上加入了一组密码,接收端必须实时进行解密才能够正确的显示影像。换句话说,HDCP并不是确认双方合法后就不管了,HDCP还在传输中加入了密码,以防止在传输过程中偷换设备。具体的实现方法是,HDCP系统会每2秒进行确认,同时每128帧画面进行一次发送端和接受端计算一次RI值,比较两个RI值来确认连接是否同步。

密码和算法泄密是厂家最头疼的事,为了应对这个问题,HDCP特别建立了“撤销密钥”机制。每个设备的密钥集KSV值都是唯一的,HDCP系统会在收到KSV值后在撤销列表中进行比较和查找,出现在列表中的KSV将被认作非法,导致认证过程的失败。这里的撤销密钥列表将包含在HDCP对应的多媒体数据中并将自动更新。简单的说,KSV是针对每一个设备制定了唯一的序号,比较自然的可用号码是每个设备的SN号。这样一来,即便是某个设备被破解了,也不会影响到整体的加密效果。总的来说,HDCP的规范相当严谨,除了内容本身加密外,传输过程也考虑的相当精细,双方设备都要内置HDCP才能实现播放。但是,最后需要指出的是,HDCP和HDMI或者DVI接口之间并没有必然的联系,只是HDMI标准在制定之初就已经详细的考虑到了对HDCP的支持,并且在主控芯片中内置了HDCP编码引擎,因此,在版权保护方面,要大大领先于DVI技术。

原理:

如下图所示,HDCP 的加密算法非常简单,就是简单的抑或运算,根据抑或运算的性质,一个数连续两次和同一个数字做抑或运算,结果是原来的数.

手把手教你破解HDCP Key


加密算法的难点在于hdcp key的产生,正常情况下,需要向授权机构购买,几台设备购买几个key.但是现在,HDCP key的主密钥已经泄漏,不用购买,我们也可以生成无线多个合法的key.

HDCP key的原理也很简单,我们举一个简单一些的例子.

假设一个随机的手把手教你破解HDCP Key的矩阵A

手把手教你破解HDCP Key

手把手教你破解HDCP Key

原理:甲和乙是两个人,他们手里各有一个8bit的数字,这个数字有一个特点,就是8个bit中,有4个0,4个1.

例如甲的数字是:2b'10101100,而乙的数字是2b'=01001011

甲表示发送端,乙表示接受端,发送端使用矩阵A,接受端使用矩阵B来产生key.

现在我们定义接收方和发送方的key生成规则如下:

1.甲的数字是2b'=10101100,乙的数字是2b'01001011.

2.甲得到的2b'10101100作为选择子,如果对应位为1,则按照行取A矩阵对应的行,如果对应位为0,则忽略,将的到的4行相加对100取模.

3.同理,乙得到的2b'01001011作为选择子,如果对应位为1,则按照行取B矩阵对应的行,如果对应位为0,则忽略,将的到的4行相加对100取模.

4.甲乙手中各握有一个8 bit的选择子和1*8的向量.这便是它们各自的hdcp key.

接下来,看他们如何交互生成同一个数字来初始化流加密机的

5.HDCP功能初始化前,甲乙互相交换各自的选择子.

6.按照同样的原理,加以分别用对方的选择子,对自身的1*8向量进行选择,为1的选中,为0的抛弃,选中的求和,将结果对100取模.

7.甲乙最终的到的数字必定相同.

学过矩阵的知识对这个结论并不惊讶,忽略B,其实选择子一个按照A的行取,一个按照A的列取.交换后,在求和,说白了就是对两个选择子交叉点的数字求和,由于是同一个矩阵,甲乙的到的结果必定相同.

破解:

所幸的是,HDCP key的主密钥(也就是上图中的A)早在2010年就被泄漏了,所以不费吹灰之力即可得到,它不是例子中的8x8的矩阵,而是一个40*40的矩阵,所以选择子需要20个0和20个1,接下来就是按照上面的流程用代码实现:

//author: caozilong

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>

unsigned long long public_key;
unsigned long long private_key[40];
unsigned long long hdcp_master_key[40][40] = 
{
     {
        0x6692d179032205, 0xb4116a96425a7f, 0xecc2ef51af1740, 0x959d3b6d07bce4, 0xfa9f2af29814d9,
        0x82592e77a204a8, 0x146a6970e3c4a1, 0xf43a81dc36eff7, 0x568b44f60c79f5, 0xbb606d7fe87dd6,
        0x1b91b9b73c68f9, 0xf31c6aeef81de6, 0x9a9cc14469a037, 0xa480bc978970a6, 0x997f729d0a1a39,
        0xb3b9accda43860, 0xf9d45a5bf64a1d, 0x180a1013ba5023, 0x42b73df2d33112, 0x851f2c4d21b05e,
        0x2901308bbd685c, 0x9fde452d3328f5, 0x4cc518f97414a8, 0x8fca1f7e2a0a14, 0xdc8bdbb12e2378,
        0x672f11cedf36c5, 0xf45a2a00da1c1d, 0x5a3e82c124129a, 0x084a707eadd972, 0xcb45c81b64808d,
        0x07ebd2779e3e71, 0x9663e2beeee6e5, 0x25078568d83de8, 0x28027d5c0c4e65, 0xec3f0fc32c7e63,
        0x1d6b501ae0f003, 0xf5a8fcecb28092, 0x854349337aa99e, 0x9c669367e08bf1, 0xd9c23474e09f70,
     },

     {
        0x3c901d46bada9a, 0x40981ffcfa376f, 0xa4b686ca8fb039, 0x63f2ce16b91863, 0x1bade89cc52ca2,
        0x4552921af8efd2, 0xfe8ac96a02a6f9, 0x9248b8894b23bd, 0x17535dbff93d56, 0x94bdc32a095df2,
        0xcd247c6d30286e, 0xd2212f9d8ce80a, 0xdc55bdc2a6962c, 0xbcabf9b5fcbe6f, 0xc2cfc78f5fdafa,
        0x80e32223b9feab, 0xf1fa23f5b0bf0d, 0xab6bf4b5b698ae, 0xd960315753d36f, 0x424701e5a944ed,
        0x10f61245ebe788, 0xf57a17fc53a314, 0x00e22e88911d9e, 0x76575e18c7956e, 0xc1ef4eee022e38,
        0xf5459f177591d9, 0x08748f861098ef, 0x287d2c63bd809e, 0xe6a28a6f5d000c, 0x7ae5964a663c1b,
        0x0f15f7167f56c6, 0xd6c05b2bbe8800, 0x544a49be026410, 0xd9f3f08602517f, 0x74878dc02827f7,
        0xd72ef3ea24b7c8, 0x717c7afc0b55a5, 0x0be2a582516d08, 0x202ded173a5428, 0x9b71e35e45943f,
     },
        
     {
        0x9e7cd2c8789c99, 0x1b590a91f1cffd, 0x903dca7c36d298, 0x52ad58ddcc1861, 0x56dd3acba0d9c5,
        0xc76254c1be9ed1, 0x06ecb6ae8ff373, 0xcfcc1afcbc80a4, 0x30eba7ac19308c, 0xd6e20ae760c986,
        0xc0d1e59db1075f, 0x8933d5d8284b92, 0x9280d9a3faa716, 0x8386984f92bfd6, 0xbe56cd7c4bfa59,
        0x16593d2aa598a6, 0xd62534326a40ee, 0x0c1f1919936667, 0xacbaf0eefdd395, 0x36dbfdbf9e1439,
        0x0bd7c7e683d280, 0x54759e16cfd9ea, 0xcac9029104bd51, 0x436d1dca1371d3, 0xca2f808654cdb2,
        0x7d6923e47f97b5, 0x70e256b741910c, 0x7dd466ed5fff2e, 0x26bec4a28e8cc4, 0x5754ea7219d4eb,
        0x75270aa4d3cc8d, 0xe0ae1d1897b7f4, 0x4fe5663e8cb342, 0x05a80e4a1a950d, 0x66b4eb6ed4c99e,
        0x3d7e9d469c6165, 0x81677af04a2e15, 0xada4be60bc348d, 0xdfdfbbad739248, 0x98ad5986f3ca1f,
     },
        
     {
        0x971d02ada31b46, 0x2adab96f7b15da, 0x9855f01b9b7b94, 0x6cef0f65663fbf, 0xeb328e8a3c6c5d,
        0xe29f0f0b1ef2bf, 0xe4a30b29047d31, 0x52250e7ae3a4ac, 0xfe3efc3b8c2df1, 0x8c997d15d6078b,
        0x49da8b4611ff9f, 0xb1e061bc9be995, 0x31fd68c4ad6dc6, 0xfd8974f0c506dd, 0x90421c1cd2b26c,
        0x53eec84c91ed17, 0x5159ba3711173b, 0x25e318ddceea6a, 0x98a14125755955, 0x2bb97fd341cea2,
        0x3f8404769a0a8e, 0xbce5c7a45fb5d4, 0x9608307b43f785, 0x2a98e5856afe75, 0xb4dbead4815cac,
        0xd1118af62c964a, 0x3142667a5b0d14, 0x6c6f90933acd3d, 0x6b14a0052e2be4, 0x1b1811fda0f554,
        0x12300aa7f10405, 0x1919ca0bff56ea, 0xd3e2f3aad5250c, 0x4aeeea5101d2ec, 0x377fc499c07057,
        0x6cb1a90cdb7b11, 0x3c839d47a4b814, 0x25c5ac14b5ec28, 0x4ef18646d5b9c2, 0x95a98cc51ebd3b,
     },
        
     {
        0x310e98028e24de, 0x092ffc76b79f44, 0x0740a1ca2d4737, 0xb9f38966257c99, 0xa75afc7454abe4,
        0xa6dd815be8ccbf, 0xec2cac2df0c675, 0x41f7636aa4080f, 0x30e87b712520fd, 0xd5dfdc6d3266ac,
        0xee28f5479f836f, 0x0bf8ee2112173f, 0x43ae802fa8d52d, 0x4e0dffd36c1eac, 0x3cbda974bb7585,
        0xfb60a4700470e3, 0xd9f6b6083ef13d, 0x4a5840f02d0130, 0x6c20ef5e35e2bf, 0xdad2f85c745b5b,
        0x61c5ddc65d3fc9, 0x7f6ec395d4ae22, 0x2b8906fb3996e2, 0xe4110f59eb92ac, 0x1cb212b44128bb,
        0x545afda80a4fd1, 0xb1ffea547eab6b, 0xfac3d9166afce8, 0x3fe35fe17586f2, 0x9d082667026a4c,
        0x17ffaf1cb50145, 0x24f27b316acfff, 0xb6bb758ec4ad60, 0x995e8726359ef7, 0xc44952cb424035,
        0x5ec53461dbd248, 0x40a1586f04aee7, 0x49ea3fa4474e52, 0xc13e8f52c51562, 0x30a1a70162cfb8,
     },
        
     {
        0xccbada27b91c33, 0x33661064d05759, 0x3388bb6315b036, 0x0380a6b43851fb, 0x0228dadb44ad3d,
        0xb732565bc37841, 0x993c0d383cfaae, 0x0bea49476758ac, 0xaccc69dbfcde8b, 0xf416ab0474f022,
        0x2b7dbcc3002502, 0x20dc4e67289e50, 0x0068424fde9515, 0x64806d59eb0c18, 0x9cf08fb2abc362,
        0x8d0ee78a6cace9, 0xb6781bd504d105, 0xaf65fab8ee6252, 0x64a8f8dd8e2d14, 0xcb9d3354e06b5b,
        0x53082840d3c011, 0x8e080bedab3c4c, 0xe30d722a455843, 0x24955a20397c17, 0x82495c1c5114e8,
        0x656e71c31d813d, 0x1f0a6d291823a1, 0x6327f9534353fa, 0xb89529c2f034fb, 0x70e9b12205c7b3,
        0xa06c87969407a2, 0x520bfa2fe80f90, 0xda1efc3d345c65, 0x313936ec023811, 0xa8cc87128be2fa,
        0x4cd0e8645ee141, 0xbe7975519e2b63, 0x9543d23113c2a8, 0x3d87b0da033f22, 0xdf0464c704e9d4,
     },
        
     {
        0x7e1a30947e867e, 0x014ae464b37935, 0x5c4babf689fa4e, 0xc4aec0cb01cc35, 0x328c0e4a0230e4,
        0xfdacb93b419594, 0x26deefc8a553e6, 0x6e75a2d790cb55, 0x2c4554518f7396, 0x94b77184cb145d,
        0x95f883f620a8bb, 0xedff42866a2783, 0x7b4ee6304b711d, 0xed56e077a4b9fb, 0xc4e60e687ff6c3,
        0x0cbf144b8f64d5, 0x023dd10a35eddd, 0xbeaa3323e999c6, 0xd2e016b31c38c4, 0x8d2917a888f799,
        0x18c3abd28e736b, 0x8d38e69b4966cc, 0x624db0143dd2e7, 0x5e2fa510f632b7, 0xee6e64d45b139a,
        0xa1c6d852e74be7, 0x429843b9e6bb7e, 0xdb9ab07c8dc267, 0x9efa092299f071, 0xdcca9e0e61e960,
        0x94406fac95f1d8, 0xd19122f3f88782, 0x1b11a662e9c83f, 0xd161fd6fb7f032, 0x89f7d984da9d48,
        0xa3583fea45fe58, 0x885e2c4839e254, 0x47e87235f713b1, 0xf4732e05b71aee, 0xae026d063f4349,
     },
        
     {
        0x0a481d2db197af, 0xabfce1039d4ac0, 0x4a6b89d2d1aeac, 0x0842eb7178cc53, 0xb82ce2835f1937,
        0x3b4002ca21d6b6, 0xe64a78a78abb27, 0x8bd6142ad04526, 0xe035dacb23624a, 0x4cf80110135771,
        0x7a52fafc92745e, 0xefa28a290ea782, 0x735617cd8b0221, 0xb095e9f4b286a5, 0x021e9ba0727645,
        0x3e58e9ec16ed1c, 0xd7732bb5ba99a6, 0x374bde43fa89a9, 0xcb83e5ef2e4d04, 0x1da4f73566d134,
        0xe01da194625c25, 0xd62018764d7473, 0x64643721313d24, 0x5a01badd970941, 0x481c9578781414,
        0xa4d3faa92d1fef, 0xbd4b247d37862a, 0x5332a7ca3c2ca6, 0x393ee51989d5a9, 0x01a6e564040d37,
        0x390c472ee27892, 0xf0217fe009e9b4, 0x5d3f04da415b35, 0x612ecd5b8e4eac, 0x757e27d2169f2d,
        0x92853b737b7526, 0x9ac837c86476df, 0xe956c2b45ebd5e, 0xd4fa6da687ac39, 0x60f4343669ddd3,
     },
        
     {
        0x64b8d778e72e78, 0xf86cd55efe92b8, 0xa9adbf2e728440, 0x966c8282cee1f9, 0xea195972b883f4,
        0x46ac03b37e7f24, 0x744df253954ae5, 0x22e3f9a0adbc58, 0x6add7c7d8a2961, 0xba963e4912d17c,
        0x2840ac28fcfad9, 0x8d8ec3ad6dfc32, 0xa3c788dd094910, 0xe65ebb61dabb5f, 0xb50e906b28c881,
        0x003b11eb83e6a9, 0xa2fac0595b138d, 0x3d55a28f915330, 0xc343bd1849a085, 0x54c786629d2b42,
        0x1d465cb22ccbc2, 0xd8f87fd52aded1, 0xecb34f46656b71, 0xb4cbe50f839f2c, 0x2df6a553cc3698,
        0x40b2dd25f26d51, 0x492f3c5c6fa566, 0xf80dd453864548, 0xd4be786d8735d9, 0xe364511a0fb62d,
        0x3c2df64d6d1c9f, 0xf640e4ef4186be, 0x41773025d6ff57, 0x6147e75d7df3f5, 0x49809548639d16,
        0x01067ef6034247, 0x4e7c1b20deb154, 0x3f8172a6b98ea0, 0xb0691d4b575801, 0x136a88607a3e5b,
     },
        
     {
        0x0180058ca8742e, 0x972bc2ca1c4cb6, 0x7b05bbc57e63df, 0x5f01049697eaa2, 0xc537f3121384dc,
        0xedb1fa0b34f132, 0x689b1374cafe25, 0x802d7bca5c6674, 0xf8e01e75e9eb3d, 0xa59c2d9126d85d,
        0xf10f603f8c4fd9, 0xd5a358aa84b2d5, 0xf8320f2a3bd078, 0x019bcf0dabb5c3, 0x43dd8dd5e173f0,
        0x45169f788a0233, 0xd62daee0e9839c, 0x7d673cf77a53d2, 0x008730faf272d0, 0x3c08080778ae8d,
        0x920e40fad87d7e, 0xbf118230ffb194, 0x692baf40b951b4, 0x83549affe4e382, 0x68e172f86a40b3,
        0xaa5e2c1b74636d, 0xc3d7809ac68aae, 0x33c344fd9bcc33, 0x6e6057dc7d71f0, 0xbceef547db57fa,
        0xec91cc1056e4b5, 0x8153f00c8ef4f8, 0xa2ca943ab03915, 0x079a070121782d, 0xd592dcec23dd3f,
        0x44ba5fe5078279, 0xe6f8ed790ffa59, 0xe7877e834b4391, 0xd1ca3db32bccd7, 0xb382e35bff1ba1,
     },
        
     {
        0x96cb3b9ef8671e, 0x70342fff9216a5, 0xd635530148dcc6, 0xbf40909f72ba4b, 0xe3697761ac11f1,
        0xf2a77a5f435c5c, 0xa57729bb9aaf37, 0x14f78a30f9bf6f, 0x1a7fe7f0271b01, 0x0b224bc83ef07b,
        0x0d409ce2157473, 0xadefa793287d48, 0xa6b13ce8e00a7f, 0x74d735fd54a00b, 0xe2dc16285d1b5a,
        0x8b3d55371ce703, 0xbb3909153586b6, 0x03c8c622aa53e9, 0x89ee3322e069aa, 0x325ce41fbd0175,
        0x2cd1326421cd83, 0x3c47eed2daadda, 0x87c2177de0c63f, 0x39b496d688c971, 0x179359349f5e0e,
        0x3cfa9ea9345dbc, 0x47b1948cbfe45f, 0x2a13b18cf3a0d1, 0x00b03fc13e6cde, 0x656ef26757f5d1,
        0x7c584630c27fb2, 0x02f2e14ca8a67e, 0xfcfec527978154, 0x4ec09910379625, 0xe90fc0a898a5b7,
        0x5beb0f3ee5d03a, 0x2383832708cfb7, 0x6905747e27453e, 0x1714e418f0f0a3, 0x53bcdef0965e8d,
     },
        
     {
        0x2c9b5813b90c3c, 0xbb9a20c8ebb80e, 0x045e04f3d57918, 0x6fe6ffb0718731, 0x201760abf11c27,
        0xe289872adda7e1, 0x233e7ef2b2c83b, 0x423b4c0ba711db, 0x334b15e5bd4c01, 0x034d1e41bff0e8,
        0x58a436cce28ea3, 0xe6ef4d94b49962, 0xec8728db63716b, 0x8c8ffc95c21b06, 0x0beb50502d9acb,
        0xc1eb732268091a, 0xe45e0c30cfed36, 0x31d58c384bc3e4, 0x8a26ae8b7a5c60, 0x83991e11e8a21e,
        0xe4f193c0183e07, 0x691fbbf9ccb4c2, 0x4e5214fae905d8, 0x2052c969e9699d, 0xf6cea5a6157de3,
        0xfd84477a6bad8e, 0x04f37758724bc3, 0xa491d0fd8f084e, 0x19933cec5f51f0, 0x93794e76e1f29b,
        0xebd1f1c057b30c, 0x7ec220fa6d31d9, 0x867d711c9a7674, 0xa700cf5f177e37, 0xcf3fae5da3ddc4,
        0x4e8030990c7917, 0x553a5ce2abaaa4, 0xc2296c42e2dcea, 0x19ae4f9b654581, 0x66d5fff1163703,
     },
        
     {
        0xbb5085e0e7d595, 0x12605df8a35f9f, 0x35c6d572c28ea5, 0x5099437e5f5595, 0xfb45cdaa8872f1,
        0x6e012db5feedc3, 0x1ba0e5515be76f, 0xb793b687fbf1dd, 0x9d2c01063d4ca1, 0xc2e6fde5bc3a1c,
        0xc17b11e1a33418, 0x436fcacef170c5, 0xe4c3cbc3066618, 0x2063665d2a1b84, 0xa8b5b4f2e58850,
        0xce74bcbc892d71, 0xb312d96806cdc8, 0x82d9c95678fff1, 0x5d8a0120206c3c, 0x621f13db39bd6e,
        0x4a5db4815f181d, 0x8dae6e596cebd5, 0x1b8b1681dd4918, 0x1dbcbd79f8e5ff, 0x135064b0968c4e,
        0xd81e91507c1e96, 0xce08e072644e54, 0xe1648d32befadc, 0xd0b7f41fca118d, 0x7b9291b680b18a,
        0x10ab9a2fb4f9a0, 0x9f462d2370dd03, 0xbb453f4b48b2ea, 0xb3c3e6d63c2559, 0xbe4aa3d8e8f129,
        0x90af78e01d25c9, 0x2e06a8715063da, 0x988dbf792de669, 0x17eabe5b043c41, 0xb1f700946e4ad2,
     },
        
     {
        0xe329ae8a66581e, 0x4a5bda0ff2a313, 0x79577080aaac8c, 0x0dd34f4f929df3, 0x0f5e87f82b9b1f,
        0x1ead67333c42d5, 0xebac8fb8797375, 0xdc26965e625abb, 0x953ce074d8c84c, 0x2edd54991b2104,
        0xa45196065c2bca, 0x98f56533f328bf, 0x8560a1a390e921, 0x37d2506aff3d7b, 0xf88576a47d273e,
        0x562b7c9592ffdc, 0x2d0ff0ba59787b, 0x4dd89971bd39a6, 0x7a4a778d69a4cc, 0x58bad18bf5fc74,
        0x5cac8d53dcc72c, 0xba7e9c7a2b57d7, 0xff544acc98f08f, 0x1d22f503712081, 0xcf868290f04def,
        0xba48ab7c61a8ab, 0x3ca439f055f713, 0x2401e3a43338e0, 0xb7c4b19cf1edc8, 0x37db6b0d8991a7,
        0x10ede95c9c35e6, 0xa8f021fc870126, 0x6e5909a7f3217b, 0x33772e647266ff, 0xa5c8fd0c786e0f,
        0x04f0bb34025c67, 0xcc33c6a49bf101, 0x45c563f33f807d, 0x6e95e9c2b5e349, 0x3a0e55d42d44b7,
     },
        
     {
        0x611138d0e928dd, 0x24d7958e8e6149, 0xc66faf12b50f45, 0xeaa5eb19337961, 0xe68c81cb35d5d3,
        0xed1fe1f1b8d443, 0x612ca593de8afe, 0x6c15ee22ffb8b0, 0xc27152ca5a1e77, 0x0133b8165e3ed1,
        0x608c9c1a6ca4aa, 0xdf5272bd1b6425, 0x6f7efc5b2bbfa0, 0xb49b5f0c67ee30, 0xf4ef0e7ed820cb,
        0x4b14d077b672ce, 0x3a60f2386c0218, 0x9e8d6e5f6caddf, 0xa53ccecbae8684, 0xd3183beeba0cef,
        0x4cd21e6afc08e8, 0x5db41995d15a93, 0x6afe570246af77, 0xd0994bc305b27f, 0x2de99a0885c909,
        0x1629a47aaa161f, 0x0f6b6d45ff8967, 0xcfc4e83f5b469c, 0xcc22586cab3936, 0x29e6b3f94d122e,
        0x83f00e419d8980, 0xbb282b6f3efdef, 0x30d80463fb25e0, 0x1846f8f1b935d3, 0x3c03ed5243b7b4,
        0xcb6b0e6e4c770f, 0x8bc2856390163a, 0x73a332bc2ebabd, 0xb3aeafedbc8c08, 0x74ff7726398cd4
     },
        
     {
        0x0071d5d3644b97, 0x45dd1ae0369e9a, 0xc1f518cd384512, 0xb933bc25cb3402, 0x9377c50007d647,
        0xe609eb009c9245, 0x7d99fff828ba6e, 0x9f0adcca6cd0a9, 0x5c5cf8366b699f, 0xf00f513ad9e29d,
        0x7c2ecfdb5afe40, 0x1f131691f0677b, 0x30e1df0cce8710, 0xf3c52df030e941, 0xb2bb6b650cf2d7,
        0x012a5a2d11f1b4, 0x4699b78e898918, 0x977b2e06972b36, 0x674e2619e6be97, 0x93007948f99eee,
        0xaf2b5b80b81bb3, 0x417446ac93bc16, 0x14fb20c6ab0e24, 0x3ffc77d1672771, 0x36580afea2edec,
        0x48942ed95911c5, 0xfa312a7aca8f83, 0x992e36a47ef1db, 0x3937ff39b1a9b5, 0x2af79ef5c48c64,
        0x6c88d58111a0b7, 0xb6fa6dc5f7c8dc, 0xb1acc64f2b083d, 0x332baac65b4feb, 0xe58dae530ad4af,
        0x0fbdb072d0ba36, 0xe2607b065b6fe4, 0xf803ae22cb2a6c, 0x9b639dd91166cc, 0xf5e430b9cece8c,
     },
        
     {
        0x687c1dc2ac5898, 0xb429122b168f1c, 0x4248f91ae51605, 0x1c24d7f1578ba6, 0x1dec5a6c003598,
        0xe3c04b01a812a7, 0x2df7909352cece, 0xde31efaffdd0d4, 0xe4a7f11873ec87, 0x4768f7b8d77583,
        0x23b6f7bae4521f, 0x8fbf571e568d5a, 0x577ad8b71f3721, 0x718b68ac1ada36, 0xe10689cc83ea91,
        0x43f73798b295f7, 0x6e2b078c8d68e5, 0x613c3bb265ca36, 0xd25d07032b8c80, 0x843fe3783b5959,
        0xe918f7789f0d33, 0xafac1cb1534684, 0x0fb3c6c442a94b, 0x167f58645b56c2, 0x76132472470129,
        0x590ae9be533d39, 0x75adfeba5e6230, 0x30dea290d933d7, 0x08cc4d30a4af39, 0x09bc69be193a2f,
        0xf7f8ff9f03af3b, 0x3ad1a453e9dde4, 0xa534709b6e15c7, 0xc6ce7d4efd42e9, 0x5e947977595b68,
        0xca674d0c7541e9, 0x97f178a43b6057, 0x137a6483c7653a, 0x49f1eec3082cc7, 0x70824eb5bebf04,
     },
        
     {
        0xcf95519563f7c7, 0xcef140efdaa431, 0x4f8ddc5fb70009, 0x27710736a485cd, 0x41b05dfead9e7a,
        0xdcbf8e83a3a89a, 0x23e46b5a421a08, 0x84f0fb922099a4, 0x120b226eedd549, 0xcf4706582b36f4,
        0xe3b718cabb9c11, 0x03db1daab9520a, 0x3a29a8c65c45f6, 0x0219e82dbeb36b, 0xb351c498a8dda8,
        0x0ba2a5607f3bf6, 0x0b95be14721f63, 0x62d3b4d2b1fc16, 0xf46a95de23a55e, 0xb70c2f136e83eb,
        0xa0b215f5837e73, 0xd76368870bd5bc, 0x0372cf15e7ff03, 0xc992d958598014, 0x1fb03e9712f2c4,
        0xa73b9107699fb2, 0x239ad1d706b5f3, 0x3623dab66fefc1, 0x8b5e04ac40e7ed, 0x77eaadd7c4d35c,
        0xb3ba11dde839a2, 0x621e7ab334235d, 0x29f2ed9f1990d9, 0xe0d731952272a4, 0xd31f58d8cfad64,
        0x57690ff74579fe, 0xe78fb0fe43c6cf, 0xb127e3c5c7da88, 0x1765c8883fcd01, 0xdc0028f618172d,
     },
        
     {
        0x07d8f79c0e5b79, 0xbdff41e18ee3b3, 0x0990bd1c710888, 0xb0ef52eb6da5bd, 0xb790ff7419e17d,
        0x22ab4221d42b9a, 0x35bec4ded01a53, 0x6a2f35fd63b686, 0xdb66f3c21b9291, 0x165a5fd321d034,
        0xf2ea034bd3a6b6, 0x4d47388e2680b7, 0x018dd250cfd53b, 0x53babaed27080a, 0x73c54d98e4a365,
        0x6a77f2e71cfab6, 0x4f9539f7e67a64, 0xc35beaa6ab5528, 0x1698a8ee44d10d, 0x01e623ff7096e8,
        0x96a68072d59c56, 0x6baba4b0d232ee, 0x725a1f9e0fbeb1, 0x97728ef73b9a8e, 0x16ecfe23a3bdb6,
        0xf035aac743b427, 0x202c094281f68b, 0x1c8be9e39e4591, 0x0959fad0920ae6, 0x15a97f475dc632,
        0xa3fc9e9363688a, 0x89cea147f0339b, 0xd1ffe6e68570d2, 0x329a0b16c32fa2, 0xcbd5818383dd8f,
        0xc26f57abe7c8cd, 0x4d680e55e8a77d, 0xfeefbd47b284a3, 0x41bc9077e7df69, 0x1c32ea11a0df3c,
     },
        
     {
        0x2ea8501eab0c69, 0x63dff30ea51c9f, 0x8de69a045d957b, 0x4036f90d8e90b7, 0x5886f2e5059e5d,
        0x7341e707011eca, 0x8d6006677dabf1, 0x2c6f2040741941, 0x5058a43d3958d2, 0x29eee2b01178b8,
        0xeb9e382e6ea2e5, 0x62e44ce8f6b19e, 0xa5b4444f78d77d, 0xc12755f1de34c7, 0x8fd001eb8d0d91,
        0x8a3ece83c541b5, 0x659f736aca9076, 0x1c1864cc5b30f1, 0x1b9f901459a142, 0xf5571fc19f94a3,

        0x39e842e17176ca, 0xed2a1659a97f8e, 0x625e74d131b3da, 0xbdbdfeaa0366bd, 0x95ebf86c33a687,
        0x4a09faea206cd1, 0x29f59174377238, 0x908e6c956350cb, 0x686a225a26548c, 0xa45140d1ed5b76,
        0x75e9ea2087732c, 0x14dd568be007bf, 0x3668e3791bdd4b, 0x56f9aa39df5785, 0xe7b37c964271c9,
        0xc5211e837c726e, 0x374513cd4cd34f, 0xa5c71ff1a4195e, 0x4e234c5adc13b4, 0x75093fc66c8faf,
     },
        
     {
        0x2ec02dd6ea2715, 0xd8676bb21e7f0b, 0xb4c22ceadbd907, 0x9ccaf78857ea36, 0xa28da605bbf2d8,
        0x723651fb07c86a, 0x07039b49d2fa32, 0x40dbb6dc2ef93d, 0xda48f7e9d5eb92, 0x45bc6190b3a9e4,
        0xfc84b55352b994, 0x25f44b36a3fb83, 0xd09a8f4ab7d78e, 0x0829201a523b21, 0x966e0098395656,
        0x5984c4e317d930, 0x581dd2ab677c99, 0xa92a70424c5aae, 0x4ea1dbaca67de1, 0xe45918a0d6d560,
        0x1e5c75efdd907f, 0x99a6e56cbb015f, 0x04fd11c8ae4d05, 0x83a72f3e967bb6, 0x2ddf23b892d1e5,
        0xd648bbe9e5f8d3, 0xd4b128d667ff6a, 0x781dcd435b03f4, 0x1a1cb99fc298e1, 0x69d80c51941a26,
        0x5263476c788bb7, 0xdb0b584b59ec8d, 0xd95a4e9a6a95c5, 0x5263b0eb0cc8d4, 0x98e62e5116ab09,
        0x97564c79d4b733, 0x39d708c3284fb2, 0xd2cd596efe674a, 0xa9e3b1f33b4473, 0x70b30aa67c0c2c,
     },
        
     {
        0x3532c9874c8ce5, 0x680a796f9db4b3, 0x64e5825663090f, 0xeb0a67604f3f9b, 0x7c4716c88afa20,
        0xcecf4b6b1467f8, 0x342600406fe556, 0x200290eea56903, 0x36562b6cff764c, 0xb02d3847d68f8f,
        0xa26c2ab20fe063, 0x5de36be096db8d, 0xac5998b94e3c17, 0x4c8808ebb9bf53, 0x4bbf0a436470da,
        0xd3875253f7b0a9, 0xa99369bfede348, 0x8c3391fd3a5f95, 0x5005f88c89d735, 0xacd8196d21d41b,
        0x5ba2ce34f48817, 0xda3e7f4332994f, 0x8cfe88c8ae18af, 0xe4df8b64d16e61, 0xb0f200ab8229f9,
        0x5a15b4ad681a60, 0x350a1bb85a5708, 0xf5731809fe17da, 0x9da29858778783, 0xe496533ffbda6c,
        0xa590c76b953dff, 0xedbf61ba227191, 0xf7fd713fd0b4bf, 0x4a5e6df9905845, 0x42ed273f1fee88,
        0xe56d34cbb2866d, 0xcc76209f9773ec, 0x4c21238f991ec6, 0x7adff263cb22b1, 0x4fb41d94f97f42,
     },
        
     {
        0xf26d90e0b24a1a, 0x37fe90421cee92, 0x5cd69e29e95550, 0xbec2bff0431bc0, 0x6acc812fa97ad4,
        0x4f19e44dd33a0e, 0xd9280b1ae70cff, 0x6575a036db7f1e, 0x7bf2ed31bcef8e, 0x45dfb49b8dc51d,
        0xe1fd10fb1b59b8, 0x092da05f342c0a, 0x01fa56a0375319, 0xc1f5ad03dc627a, 0xcb1f2c96f11444,
        0x5d67a093467a43, 0xa832f56266f0bf, 0x7a464d7fab7c48, 0x42561af703a045, 0xc1c9b270211af3,
        0xedcaf802cfd336, 0x6f9ba5cc39c3dc, 0x585554fa4224ca, 0x4a7216b8d2dd3e, 0x16c2d8b31e6fa9,
        0xe9ae301e1bfa98, 0xac8389842b368a, 0x158c5060209885, 0xc01a2c3f5b7bca, 0xd20124920faa1c,
        0xa2217820d1fa40, 0x803272c88d1844, 0xc2554237c9ecc8, 0xd25f509a6db1de, 0x325148c1726f18,
        0x398c66b1339048, 0x8c8c43dd7f2c26, 0x24cf4ec93ee498, 0x54618829620375, 0xeb494db615a50f,
     },
        
     {
        0x69e1fb949b4215, 0x3e02e353426513, 0xbf6ea2adefdded, 0xfbbb781d40e52c, 0xd6ebec825d94a0,
        0x3f84de44b6fd50, 0x0b466ea0458290, 0x3a77f7804e0c62, 0xb0ce750e2b2078, 0x69f346f188a43a,
        0x24ef26f7c284a3, 0x544ea716d5498b, 0x3e1f23b1154dcf, 0x6d5c580dbec7f0, 0x120302c7a16ee0,
        0xbae4ae638ee502, 0x60cd112182bd84, 0xdbc443744789a8, 0x7faefcebed3a2c, 0x579c0f77cfa536,
        0x0d920b050cb068, 0xfb2fc616ee5eb8, 0x3b7082e645d419, 0x40df3b620a8474, 0xdf360190d74ec7,
        0x28f0d33396ee1e, 0x3c007bfb335325, 0xac5c5327fcfbe9, 0x9daecd75584e11, 0x770aecaa7200f5,
        0xef955be6081878, 0x8c906f9fbbd9a8, 0xf16d11b5a2980c, 0xf837a8f49c0378, 0x33efbbae308e71,
        0x0bda652822a309, 0x8990e49a4320ce, 0x8bf60c5517e853, 0x0b0f2a3d47d09b, 0xb07d28e7903ac9,
     },
        
     {
        0x5009b61262ab9c, 0x0161bb90668bf4, 0xa314e46c502058, 0x447250d9698fed, 0xc3e4ceaa255d41,
        0x5ba4045c2fdba8, 0x17b0720f52e736, 0x0eb0036d8439d0, 0x9e15116b8245e2, 0x3dad88738ceab0,
        0x260986d154e9a9, 0x56cd13e67e508e, 0x9895906f7a2bc2, 0x4970647a63ed02, 0x5e192810f2e040,
        0x02e7f4cad9b4cb, 0x18d5850dc181a2, 0x05204ea9653f18, 0x2d3b188124823d, 0xf9b34ca3d2c93b,
        0x2e5ba515010f68, 0x7308114d65f874, 0xacbf4d6286131d, 0x46681d439816a8, 0x15fc07b05c47fe,
        0xf0ef6a332c3132, 0xc4630529dd2021, 0xa743a1e9423e63, 0xb12af7fe3d806e, 0x0cb7d03c2afdae,
        0x7abe068af28323, 0xfe75b567a2c0c7, 0x069313cf6c1f44, 0xa39aeec0ddcc87, 0x747c3bd20c1471,
        0x876af6b8558b0f, 0xeb0b357c5d8f97, 0xc64ac9dcac22f2, 0x856e4341b42b50, 0x663b16ec5eb01f,
     },
        
     {
        0x0d31dd990e70cc, 0xf7203530ab3d19, 0x6d42eb5412ec69, 0xdc9e4fcaf97880, 0xe0dcd2d94a10fc,
        0xb5f39a9e831217, 0x4b084adf9c02c4, 0xd3cabf53a97846, 0x4c331980146846, 0x3c9f7c840833be,
        0xb0cb542c3108b1, 0x9dcf7401e6f79a, 0xc1f27ed5dd4e0e, 0x509cf69e83c56c, 0x15ca00d43e1758,
        0x5948602f5bf14d, 0x1d129ae6b9f4ee, 0x2b58f973ae2956, 0x6a6c792feb0c13, 0x62474058c00758,
        0xcaab48f22b2e6a, 0xed88328618842d, 0x0418ebd349eb34, 0x846eda10087342, 0xe8b6c21b95cbf9,
        0xcc90523ed0cb59, 0x4c9374718e79ca, 0x60c8fa29dd489a, 0x41f2190a03e88f, 0x8ac12bebb17c5e,
        0x3195835960d662, 0x2317a3d2d90ead, 0x5f5aeb6d34f4e1, 0x7a39957a01179f, 0x3f88d79fc83f9c,
        0xedb1049a771b1e, 0x30a85067c640ed, 0x06cac8047923de, 0x59bdda0f1b1b9d, 0x7a014eaecf61b7,
     },
        
     {
        0x292e8b0f865638, 0x4dc1de3d7f5dda, 0xd9b1b7557b4db8, 0x54813ab90c75a3, 0x9b35f03246f1e4,
        0x20f760465bc347, 0x0da41ba5991181, 0xa6a49de8fdf505, 0x60b1ea116f81a6, 0xce2716aa9919a7,
        0xe3fce68f208dd3, 0x05d5b9594f643d, 0xded74364c812db, 0x16b6e7e4269696, 0xad975ff975a727,
        0x4d6e503b6ae9a9, 0x9ce664850ed1da, 0xa714650763250b, 0x944b7b251c3e6b, 0x0d37d4e4854c4c,
        0x06c7e1c3d4b917, 0x5602bc69558908, 0x92f5ddd9a20bbd, 0x84d12a16b5963d, 0xd1426dd7f44f09,
        0x06cca7d8cd71ba, 0x710072c1b4ea7a, 0xebabe1e8242f72, 0x69960c6c0d5bf3, 0x2084edb90ada1d,
        0x235ed7d8a9fe39, 0x3b133ed8a3fec1, 0x132c4509579af1, 0x203ca5447787a5, 0xca938128fcd756,
        0xca569d31b6f05d, 0xedec4129270543, 0xff17078079c2aa, 0xf642caa8568a3b, 0x8d1f6c3bf9b5e7,
     },
        
     {
        0xc947c61701ce12, 0x1a3808b18cb73c, 0xd1d7543be23892, 0x9917eefd8b4b7d, 0x0eabef30f24b08,
        0xb72c10d49c60a3, 0xc01344f22cc2a2, 0xb97c57f2a37b00, 0xf82a2f9338e520, 0x5a8b9c9ce0dc1d,
        0x8a4d7e7260e257, 0x62046c5551c0e9, 0x19811c1011cf28, 0xdc158db4a957c2, 0xb516e794206aa4,
        0x4a9e535622d8df, 0xbea44b252b2ab8, 0x7284568528acd5, 0x239ab1d64c7025, 0xbad538907922d6,
        0x57fb163fcb9eca, 0xad97c1507e480a, 0x78e8cfc81ca935, 0x14eee2413bbe9d, 0xe349073d92ab5c,
        0x8ed191d530d9af, 0xf3a72b6e194e41, 0xd26925b22eb6c5, 0xf709c6088bb419, 0x8527923aa6f4f3,
        0x1345fcb8916f88, 0x9f82d7a298174b, 0xb0a41e5d16d9d4, 0x28c7eab4098fe2, 0xf34abb591392d4,
        0xa5084515586118, 0x71f3fcfcee19ff, 0x180d1b40c23b7c, 0xc18c22be085cc3, 0xedeb86d04f3c78,
     },
        
     {
        0xc56c61899b8011, 0x2cf78b1bcd5b77, 0x99247be60f0cdb, 0x4c8a9aa7a58409, 0xe2bf0ad4cfe9b6,
        0xf79b501f91d364, 0x5fd2c40e48e881, 0xc650973fb8e681, 0x7c8ae6d3aca02c, 0x7a01c329e3bf17,
        0x3b126f2cda1e76, 0x229d405bbc41d3, 0x5e028a9f388566, 0x97e13e1dfee5e2, 0xaa02da00a5271a,
        0xbe2abd92296fc2, 0xe380153ffa1a5d, 0xdc3c184ca2fd9a, 0x8dd7381eccc7e0, 0x55a7fef2252572,
        0x76da25ac98ef00, 0x3e12a21d43ef92, 0x28c5f1d9e71a96, 0xb7cd9a47a9c9d8, 0xaaf77a03539742,
        0x9f8854a9983a9c, 0x2bcde940d64350, 0x6986616ba3f75f, 0xe80cc522c68b65, 0xf03f78b91d9f6c,
        0xfdf9170e4ac9f1, 0xc84c3819797def, 0x03bbfca0340880, 0x2893d145bda408, 0xdf07456e5388bf,
        0xcbadcc8ac22dc9, 0x365807ab820d70, 0x29da8be4c0de87, 0x756ee3a7865bfe, 0x46439df366b70b,
     },
        
     {
        0xab960b51e728db, 0xe2e3c346921e4e, 0x74c6317baa49fb, 0xb3efd421fb40bd, 0x979d2df24bca93,
        0x98d5bd5de71195, 0xbc030746a50c59, 0x02cf2a4b1b9812, 0x467af79145cfaa, 0x0ed643c7b530e4,
        0x181ef7d406026a, 0xf6ea606e325377, 0xa302d06af1f7cc, 0xc7658f6ae6defa, 0xbbe5314d959e1f,
        0xbb5757386c8799, 0x8759670183f618, 0x58e0cc3816f883, 0xc113183a0578ee, 0xce5456e86ee96b,
        0xc04285b8c56bb1, 0x74e5fb66d586e6, 0x9d8eea215e70c8, 0xf4a00feb7bc2f6, 0x369c2bf470063d,
        0x5b267be08f0594, 0xc26fb2440b1ac6, 0x8610ef5a140769, 0xbb3d5b50a536d4, 0xdf6c30bc09f971,
        0x74e572ca84d171, 0x2deb91e812d860, 0xb17ac9ae5be211, 0xc95a0e3f542c78, 0x46397245b13a99,
        0x1806ab9ceb6646, 0x1b4161b0ec2edc, 0xfc536e2a24abf8, 0x9f7207bf519f1b, 0xabf95b0d0d3cae,
     },
        
     {
        0xd9e17ba1bf7678, 0x6526f524fad677, 0xec243ad271d0cb, 0x9b1c06cf737605, 0x0a36697c74beaa,
        0xfa0f0056a6bd7e, 0x9f2d03db497a93, 0x027d76e6e8692a, 0x72ceb29c5913a7, 0x55eb297dae3330,
        0xeb676e7345fb39, 0x7021192efd5b47, 0x462906905e7511, 0xe005f52fd8da5e, 0x1288c01960d735,
        0x3460b18eafd2d8, 0xfaa9b1c3caf426, 0x5035e585d9fd2d, 0x85636dff1d4e42, 0x600c4b7f664267,
        0x02b21e6a8c7a03, 0x79ce25c264e2f4, 0x035a7f32c227ea, 0xbf8f711445a7d7, 0xd0b5e3b336f71e,
        0xc454a416321483, 0xbdc1a7a9d20dea, 0xe1ee4744e83143, 0x5b6969f2864529, 0x17a6b42d6346ab,
        0xff0fb6edf2265a, 0xba75b0991f6dfb, 0x6638c1d7243ff8, 0xe7806af6600486, 0xdfe3bc58f31717,
        0xb0c4adc2717922, 0xc11abff0b4a290, 0x43598e076f60be, 0x2ef17ad2f77605, 0x3a41a09d974da6,
     },
        
     {
        0xee787846e7ff26, 0xce05d869fecf18, 0xfde916d95f9357, 0x4c1b4dd723b90d, 0xb1f024400d61a2,
        0xf51dfebc71b770, 0x461e7f725d9637, 0x2b1587ff40035e, 0xa2cafbcd0c6b17, 0x2e9efaf6986045,
        0x80e339a823ea56, 0xfebfaa02609bb2, 0xa33955624e1602, 0xa137b84639ef0c, 0x6e2ecf420a6d6b,
        0x69f13acbea8f97, 0xb4d36c41e3a867, 0x1352aee4798c08, 0xe3ec254ddf35cb, 0xab600d90f13919,
        0xd00cc1d401fd2c, 0x1c629e621756d2, 0x090f8d6e0895fa, 0x701bd1b0a355ce, 0xa53c7c91b15eb4,
        0xdd8579d4dd92e4, 0x03d1c960c63d55, 0x215a8fbc09cc85, 0x59c1e6069b6dd1, 0xa0428bfb223cca,
        0x46d131153e9982, 0xc5dab0c9ffb93d, 0x682db866d6503c, 0xa481c48384a087, 0xa417c564567258,
        0x2ec7b9722b5c5f, 0x2d491f9cf79086, 0x30cd268b1088d0, 0xf02e69b1441963, 0xd9841b5339d18f,
     },
        
     {
        0xa26deb7b957527, 0x337f3bd67d3c51, 0xe6839a4d5fe4cf, 0x1619c18889be68, 0xd971f0f57d1016,
        0x56213ebf152a2d, 0x9c0e0394832c92, 0x9e6fc90ca28ba5, 0x9c5151dfbb8394, 0xf49fe4cf2a3f7a,
        0x97f4db054b2b34, 0x2a4c21abf6406f, 0xeb941a80bee3f8, 0x7615468e80e77a, 0x0f935ebe8e8842,
        0x959f2b3ba1f50c, 0xd6bc8b614e39de, 0x3c43d13746983a, 0x7956e617131247, 0x56de3547cf1010,
        0xc16d5d1fce2bcc, 0x3e73e5ef9fd691, 0x1211c1a27803ad, 0xf1c9644aac4ba2, 0x8d67134e3be189,
        0xd8aee617c607cb, 0xf62677b30d8ece, 0xe7df69402b2291, 0x6ec102f220e09f, 0xa6223e874c3e53,
        0xfb474983ebdb9f, 0x806832bde2f4e6, 0x7c25ef688134b3, 0x4aadca3409a6b3, 0xbdccd638f3b19a,
        0x2b01f18625fdd1, 0x0f5e91c28af081, 0xf28e4dcd9077cd, 0x9229d87caebbfb, 0x072b846b4d2ce0,
     },
        
     {
        0xfd7a25e195d67a, 0xec9546899268d2, 0xff3068a2e9d0c2, 0xaf9f2fc2de9978, 0x01b47566d0faef,
        0xfc5a8eab966720, 0x4b981c9fe7ff10, 0xb4a0aa0873484e, 0x25a8b544ed8801, 0xc72530c2e5d37f,
        0x94b0483e74e4fa, 0xbc5ac97d82cd68, 0x1a23d34cce0d52, 0x6e4d17a8475b19, 0x63493b14551149,
        0xd36db24ae5ced3, 0xa24a53ea6aada0, 0x230cbe502aa32e, 0x2aa07485f281e6, 0x66777be0d719c7,
        0x5d3ab65be78916, 0x06076f42e71bd2, 0x273e56dd3eccfd, 0x5ef1c9394b6a9e, 0x42f1f49590ffa2,
        0x1e6ab6994e56a8, 0x8d54a339e301c2, 0xefff698c46e74e, 0x6721df7c5334d0, 0xf36cf6a93bf3ff,
        0x91d8979d8fe631, 0x321dc8b5eccceb, 0xa237eb1423c395, 0x4623a16cc50b79, 0x83f616f60d8114,
        0x32c15a65536b82, 0xe4a00d384d99cd, 0x369206bbef6fb4, 0x42a720e294a9e4, 0x768a1c77e94dac,
     },
        
     {
        0x31d4798dffbd75, 0xda46bbd77e908b, 0x0fc027a69fcccc, 0x4204ee745159f5, 0xc14155873d42b2,
        0x7ce0c031527eae, 0x22fb1c9d6da9a7, 0x33c940531510c9, 0xd938e52464ce71, 0x385b73fa95a2d3,
        0x597bf6362dd268, 0xf9901921654409, 0x7c8d064cd5b4ea, 0x80e8fe2f1b3288, 0xee188609ef2cdf,
        0xbeee34a1c48fe2, 0x459cefca35857f, 0x33b5320fbbca79, 0x7789297027b6a4, 0xf1debe5a09d013,
        0xfd5d818a56bf63, 0x19a092fb1ec45c, 0x526f5d3ff64331, 0x9b8295291aef56, 0xd6963c3a92c34c,
        0x065482a033fbbb, 0x9b9ab43410d764, 0x44ebbd99c86a86, 0x4c087234311b85, 0xdb6e5a803ba13f,
        0x760c159ce2a619, 0xd58d83243fe0ba, 0x1c1e5e83aa79b5, 0x75c8bbae9baabf, 0x2ed91bdb632ae8,
        0x8e46b443cfffe5, 0xafa4f53f148577, 0x0be538701c4afa, 0x3fd89c44ef7ced, 0x060dcdc21e9368,
     },
        
     {
        0x0a5b9e2ba4a53b, 0x63db0419a96d30, 0xf68e038377a61e, 0xaa15b78389ec74, 0x5f532809ff80f1,
        0xf2892acc49ca4e, 0xe2d68174c08e81, 0x378254a38f5138, 0x0b060222bb20b1, 0x8013f6f4745c47,
        0xef08e87e2c197d, 0xb69d5ddaadf417, 0x7bc66fe482b730, 0xf4bd76d3bb1dfc, 0x09492b63f2935b,
        0x43875dd685ab00, 0xe15a528f666486, 0xaad1fac042ef90, 0xb3bb7b8ef9c2e9, 0xc78967b9392a1c,
        0x2f05fd5ca0230b, 0x1008345afdd18c, 0xdac73c313ace60, 0x346d535e500b62, 0x12e6357496459b,
        0xecccdac5a34926, 0x3b880f7098608f, 0xe66c3352a9cdd6, 0x049b176ff1a04d, 0x897d9569948066,
        0x806230e9740d6e, 0x179ebf2b7952ab, 0x3a2c5079b5bbea, 0x73261b85c35fb1, 0x5b917dc1bf7e57,
        0x9c55b95581c1d5, 0xe1fb86e6219639, 0xc72a22d8404448, 0x95dc5d7b966027, 0x457f3fec730d5d,
     },
        
     {
        0x469cd82a2b3cec, 0x021d9de560b8d6, 0x85b4d126933886, 0xc8265dafb87325, 0x8741d99af7f420,
        0x1329e52d3e66f8, 0x7d37c458a6ad05, 0x1241c5ccbc355b, 0x7fdcad3c3c269d, 0x05f04a0a23acc7,
        0xce076aba97cc18, 0x74b36afc4645b2, 0xcd7adaad8f5b91, 0xbd0651649dc722, 0x3d9b6437c667fb,
        0x6827ec09eed45e, 0x8ad6102faa934f, 0x1a80658c0bfe1e, 0xef1749235ab59f, 0x75478ad5949a06,
        0x49ce6e19841851, 0x8df41dc39cc628, 0xbd9dc9bec89c8b, 0x7771a21fe8028c, 0x65082929b051f3,
        0xc657798a3aebd1, 0xce9c37c494cfc8, 0x156efce8330e42, 0xd0d95860d39040, 0xdfb0fb66f814c4,
        0x4b421540a0aece, 0x9e767cbf7e9c49, 0xeeea5b5c866a9e, 0xe2026ca4bfb067, 0xec9fff1a5d41c0,
        0x290ed4da32d333, 0x65208d00dba471, 0x99e1d15a83b736, 0x5585401976a265, 0x1668daeb4aad72,
     },
        
     {
        0xcdabffa646baca, 0x7a6c7bb29875f7, 0x1a87a53a2139c1, 0x1ecf7ae823158a, 0xb1087bf595f7f2,
        0xd8e668fe076e4e, 0xb0794cf137a863, 0x81e2a419a320ac, 0x8090b1d39e5171, 0x813903d5f1a68c,
        0xba31f8211e56bb, 0x52413eefa30a66, 0xaf88d053eb8a4a, 0x4d2235fdb9bf91, 0x69a947973d3ed3,
        0x0dbcf583c26ffd, 0xb6bfbee58458b7, 0x5a12f3e625e5d8, 0x53ae22c2b1bc6a, 0x8e6f7e7bbde691,
        0x2b692a6746d3be, 0x686438e4ac66e4, 0xaa77be21178471, 0x36aed3fc3ff079, 0x8c9373ebb1c2f7,
        0xbb99fd5bfaebc1, 0x665902d08610e8, 0x8af0db91b80b6e, 0x00d4995f9a6ce8, 0x1d503d26442bd9,
        0xe61b181dfd0949, 0x2a02f5075a277e, 0x76caa7ddc435fe, 0x5cedae4cae7a57, 0x4b5f7c58c4f214,
        0x1446a05c1023ab, 0x459c93a9f5ad37, 0x1ea5f5aa4060b2, 0xa48215350fcd60, 0xac21e2a4729a51,
     },
        
     {
        0xf18cf87ecf430f, 0x0fd48c241ac6bc, 0x33964cd2e3d9ec, 0x8bebeffc2e848e, 0xbb84a5c2ea9b0e,
        0x311f20ff7ce601, 0x752573f4effe98, 0x79dbe4d184dce5, 0x6bb04def99d322, 0x7d2d5f23c2475b,
        0x7f93f7dbddf04e, 0xfff303e751fffe, 0x08d205f8999a3d, 0x5750d14f75e056, 0x1107a3f96ca8e9,
        0xf62b50c8ad9f20, 0x53e7fcc55d72d8, 0x6345dec1054cb6, 0x01d52c21dc654a, 0xaa0bd78e39c594,
        0x2265b675381cd5, 0x57cc03dd65f821, 0x1fa373049059a8, 0x9885886b48085f, 0x8357ab98192a14,
        0x5bb6cfbf84048b, 0x5cf862f25ff6ab, 0xc9382e36ab2dbd, 0x2357b5ade91fcf, 0x2db77558ceef24,
        0xd4a0cb3ba50a2a, 0x12c3cb633dfe47, 0xdb805410168807, 0xa5e635ac766e1a, 0x25252810f49fad,
        0xcae296fce18ed4, 0xb9932d5822c519, 0x4b7006cc54ea84, 0x2546d761d284cf, 0x2346d0a11b1ed9,
     },
        
     {
        0x81ce0d028c4474, 0xc8002fd0315372, 0x8670db1a6ad6eb, 0x4c7f942260e9c9, 0x822bb2c423cc53,
        0xe3b67febea3672, 0x59c24223d913c3, 0x6f4b196f69400f, 0x51bfb6cc7f3603, 0xfb9fbef84ffaf4,
        0x7c1632636806f6, 0xa50ec42076931f, 0xf68b2be9e5e7ad, 0x7603302a518bd4, 0xd7cd9bb97ffa3c,
        0xacf1faaebf7412, 0xf55d55d548bd86, 0x5b34112ed53d06, 0x1b58692e1e33b7, 0xcc7e3cb6d32fe2,
        0x8f7b35c14a744f, 0x9a4ed599399554, 0x8eb369e71641af, 0xd4a6d1a5c74123, 0x8cc7ec376acf04,
        0xec0a470647b248, 0x2fd9e8eea1f10e, 0x94439285677960, 0x4d11f6e6a426e0, 0x06378817230b68,
        0xec14f2df152cb7, 0x199a8c0bd5f05d, 0xecad5aab44ac2b, 0xca87ab2ba6e905, 0x69c0bf2acdb36c,
        0xd66279737bc807, 0x4dd946eb19d81b, 0x4e9c473b5e9846, 0x5a016f7ca86f9d, 0xd02c2b7dca744a,
      }
};

int main(int argc, char* argv[])
{
    int i, bit_pos, bit_one_count;
    unsigned char *pkey;

    printf("Please Input a hex value for ksv (20 zeros, 20 ones): ");
    scanf("%llx", &public_key);
    memset(private_key, 0x00, sizeof(private_key));
    bit_one_count = 0;

    for(bit_pos = 0; bit_pos<40; bit_pos++)
    {
        if((public_key >> bit_pos) & 0x01)
        {
            bit_one_count++;
            for(i=0; i<40; i++)
	    {
                private_key[i] += hdcp_master_key[bit_pos][i]; 
	    }
        }
    }

    if(bit_one_count != 20)
    {
        printf("You Input Invalid KSV (should 20 zeros, 20 ones).\n");
        return 0;
    }

    for(i=0; i<40; i++)
    {
        private_key[i] = private_key[i] % 0x100000000000000;
    }

#if 0
    printf("KSV = 0x%.llx\n", public_key);
#endif

#if 0
    for(i=0; i<40; i++)
        printf("0x%.16llx,%s", private_key[i], ((i%5)==4) ? "\n":" "); 
#endif

#if 1 // for output key to array test. transfer to Little endian output
    pkey = (unsigned char *) &public_key;
    printf("0x01, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x,\n", pkey[0], pkey[1], pkey[2], pkey[3], pkey[4]);
    for(i=0; i<40; i++)
    {
        pkey = (unsigned char *) &private_key[i];
        printf("0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x,\n", pkey[0], pkey[1], pkey[2], pkey[3], pkey[4], pkey[5], pkey[6] );
    }
#endif
    return 0;
}

选择子的专业叫法叫做KSV(Key selection vector),我们选择一个很显然的KSV:0x5a5a5a5a5a

得到的hdcp key如下:

手把手教你破解HDCP Key

其中第一行的0x01 0x5a 0x5a 0x5a 0x5a 0x5a 即是KSV,0x01是标志,可以用户定义,比如象征加密方式.


结束!

上一篇:vue.js学习:1.0到2.0的变化(区别)


下一篇:调试-vs2019多线程