Blogtrottr
批踢踢實業坊 Tech_Job 板
 
[心得] HDCP2 Protocol 開發心得
Nov 14th 2013, 11:06, by anr2

作者anr2 (???)

看板Tech_Job

標題[心得] HDCP2 Protocol 開發心得

時間Thu Nov 14 11:06:05 2013

Dear all: 小弟我今年有幸在因緣際會之下, 有機會時做一個 Protocol 叫做 HDCP2 ( High-bandwidth Digital Content Protection), Spec部分有興趣的人 可以參考下面這個網站http://www.digital-cp.com/ 這是我第一次照著 Spec 做東西, 所以就以 HDCP Specification Rev. 2.2 Interface Independent Adaptation 這一份Spec為基礎下去做開發, 先說一下小弟的背景, 我是朝陽科技大學畢業, 雲林科技大學碩士, 在南部工作並在學校進修做巨量資料研究的東西, 目前工作已邁入第六年. 我學歷不好, 也不太會寫文章, 所以就用時間線的方式表達 2013/3/20 ~ 2013/4/15 1.新的案子需要這項技術, 我負責 Survey HDCP2 IIA. 並評估看看如何做, 目標是 Windows/Linux/Android都要可以動, 2013/6/15是 Deadline. 2.看Spec 翻桌 AKE, LC, SKE, RSAES-OAEP, AES 完全沒碰過不懂, 天書 3.Open Source 唯找到的相關東西是 LibHdcp2 http://libhdcp2.sourceforge.net/ 至 今(2013/11/14)還是空的……….(還好沒等 不然今年考績就很慘啦) 4.詢問現有廠商看看是否能要到技術資料, 小小副工程師 恩 當然沒有(我很傻吧) 2013/4/15 ~ 2013/6/10 1.筆記兼報告 AKE = Authentication Key Exchange, LC = Locality Check, SKE = Session Key Exchange, HDCP2 Encryption要塞資料到PES Header內 2.尋找相關的 Cryptography Library, OpenSSL因為的RSA標準為PKCS #1 V2.0不符合HDCP2規範 HDCP2需要 PKCS #1 V2.1, 很幸運地找到一個Open Source剛好有符合 3.實作Platform Independent Socket Helper for Windows, Linux and Android 4.實作 Authentication Protocol ( AKE, LC, SKE ), Key Derivation 5.在沒看到 HDCP2.2 IIA Errata前提下, HDCP2 IIA後面附的Key怎麼只有一半, RX的 Private Key沒, 自己寫 HDCP2 Key Generator 與 HDCP2 Certificate and Signature 6.Locality Check需要在 7ms裡面完成, 調整 socket option 設定 TIMEOUT 7.撰寫測試用的RX與TX, 終於完成了 8.整合至Android JNI, 利用手機與Windows 互通, OK! Android TX與Android RX 可以利用HDCP2 Encryption解壓縮PES封包 2013/6/11 ~ 2013/7/15 1.研究看看怎麼寫ARM Assembly, 目標最佳化 HDCP2 Encryption 2.研究ARM Neon看看是否能夠加速HDCP2 Encryption, 謝天謝地 Android有提供 Neon intrinsic, But 怎麼跑起來都輸給 C code. 好吧用 inline assembly寫吧, 結果比 Neon intrinsic 快一點點 還是輸給 C code. 沒時間了, 不研究 pipeline flush 與 Neon instruction之間的關係, 沒時間搞這個最佳化. 因為有一個更悲慘的悲劇發生 2013/7/15 ~ 2013/10/30 1.某廠商用BlackDuck掃瞄出使用的Cryptography Library有GPL問題, 大人:你要怎麼負責. 2.大人: 有Spec有Algorithm程式不就出來了. ok 我自己刻Cryptography Library, 參考 OpenSSL (Open source好物啊) 與相關Spec還有Wiki, NIST的規格書真的很囉唆 3.完成 SHA-256/512, HMAC-SHA256/512 4.完成 AES-CTR-128改寫 5.完成符合 NIST 800-90A的Deterministic Random Number Generator 6.OK只剩RSA了, Big Integer Implementation很頭大怎麼樣做大整數運算, 感謝Handbook of Applied Cryptography 與 Tom St Denis - BigNum Math - Implementing Cryptographic Multiple Precision Arithmetic, 花了一個月搭配終於搞定 Big Integer RSA Encryption Decryption運算所需要的那些modular inverse functions. 7.完成RSAES-OAEP原來這麼簡單啊, 雖然我不懂數學, 不過就是byte Array接一接 8.撰寫測試程式, 測試各項功能, OK單元功能都通過 2013/10/30 ~ 2013/11/14 1.開始技轉給廠商, DCP Facsimile Key測試有通過嗎? !!! 我沒有測, 開始插入DCP Facsimile Key Testing 的功能 2.修正 Authentication Protocol bug. 終於DCP Facsimile Key都測試通過了, 包含 HDCP2.0 IIA Errata 與HDCP2.2 IIA Errata的Test Vector 3.用 sloccoun 統計一下: Total Physical Source Lines of Code (SLOC) = 20,587 Development Effort Estimate, Person-Years (Person-Months) = 4.79 (57.48) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 0.97 (11.66) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 4.93 Total Estimated Cost to Develop = $ 647,015 (average salary = $56,286/year, overhead = 2.40). 大人: SLOC評估都是參考的那不準, 你今年工作態度不佳, 常請假考績會打折扣. 4.整理 Testing Tool 與 HDCP2 TX Log 還有Android RX移交給廠商. 5.莫名的空虛感, 我倒底是要讀博班讀完, 還是把履歷整理好看看有沒有廠商願意收留 我, 給我做研究 感謝看小弟的開發分享心得,也感謝這裡給我機會做事情, 如果看完本篇有興趣, 麻煩多 多跟我們技轉. PS: 照慣例看一下CP值 1. HDCP2開發人力: 一人 2. 因本人學歷不佳, 薪水扣完稅與宿舍費用實領約不超過41K. (鬼島 快逃~~~~) 沒圖沒真相附上 HDCP2 TX Log with DCP Facsimile Keys以茲證明哈 HDCP2.0 R1 TX Log http://goo.gl/K1kTO9 HDCP2.0 R2 TX Log http://goo.gl/ai1B2R HDCP2.2 R1 TX Log http://goo.gl/GPoUec HDCP2.2 R2 TX Log http://goo.gl/KL6Nyq 老實說我其實甚麼都不會, 只是會針對問題去研究找出解決辦法 以下是心得不要鞭我: 一個好的工程師重點不是他會甚麼, 而是他面對問題時,能否找到解決辦法與是否有辦法持續成長動力, 哈. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.96.194.74 ※ 編輯: anr2 來自: 140.96.194.74 (11/14 11:09)

williamyu:感覺很強啊,老闆說態度不佳是怎樣XDDDDD 11/14 11:14

proach:at itri? 11/14 11:44

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 qfasff 的頭像
    qfasff

    線上遊戲排行榜2013/2014,進擊的巨人線上看,candy crush saga外掛,正妹寫真三圍

    qfasff 發表在 痞客邦 留言(0) 人氣()