📜 [專欄新文章] Using MPC to Help Achieve Blockchain Privacy
✍️ Yahsin Huang
📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium
This post answers some of the most commonly asked questions about using multi-party computation (MPC) in blockchains.
What is MPC?
Multi-party computation (MPC) is a cryptographic protocol that does a joint computation involving multiple parties over their inputs while keeping those inputs private.
A famous example of MPC is Yao’s Millionaires Problem. Two millionaires want to know who is richer without finding out information about each other’s actual wealth. Naively they can simply tell their wealth to a third party. Then the third party compares their wealth and lets them know who is richer. But then this option is undesirable because the third party learns the information of their wealth.
The challenge of Yao’s Millionaires Problem is the computation wouldn’t be able to have a result without the two parties’ private information. To get the end result, you need those information involved in the computation. But at the same time, you are not allowed to reveal those private information to the party who performs the computation. That’s the main problem that MPC wants to solve.
Why it matters in blockchain?
In the real world, not everyone’s a millionaire. Not everybody wishes to compare their assets and wealth with others. In the blockchain space, there’s a need to ensure the inputs are shielded from multiple parties for privacy purposes; hence, the need for MPC protocols.
If we look at the current landscape of the blockchain world, notice there are blockchains doing great for programmability, such as Ethereum blockchain, allowing developers to build great tools and applications on top of them. There are also blockchains doing great for privacy, such as ZCash blockchain, allowing users to send transactions in a privacy-preserving way.
However, there’s a lack of blockchains that are designed for maximum programmability with maximum privacy. That’s why a lot of folks are pushing forward the work on incorporating MPC protocols into blockchain designs.
Why ZK is not enough?
Zero Knowledge Proofs (ZKP) is great at shielding private information that involves only one party. ZKP alone cannot be applied to provide privacy in multiple-party settings, such as auctions or in the case of Yao’s Millionaires Problem. In those settings, computations would involve private inputs from multiple parties, and so ZKP wouldn’t be enough. We would need to turn to MPC to achieve that.
Recent developments in MPC
In his presentation “MPC as a Blockchain Confidentiality Layer,” Miller gave a high-level overview of how MPC can be viewed as a confidentiality layer for blockchains as illustrated in the slide. Credit: https://youtu.be/0VuBELYfChM
How does MPC work with blockchains?
HoneyBadgerMPC builds a sidechain that performs MPC protocol computation. The sidechain acts as a confidentiality layer to the public blockchain, where secret data is stored.
How can developers build MPC applications?
Developers are able to develop MPC applications with Ratel language. Writing Ratel feels very similar to writing Solidity contracts. The compiler compiles Ratel code into two parts: the Ethereum part, and the MPC as a sidechain part.
Ratel code looks like this: https://github.com/initc3/HoneyBadgerSwap/blob/coconut/ratel/trade.rl
Learn more about MPC as a sidechain
One of the biggest news this past month was you could now play with HoneyBadgerSwap’s demo website. HoneyBadgerSwap is basically a dark pool version of Uniswap using MPC. You will need some Kovan ETH to test it out. Yunqi Li (UIUC, IC3) made a great Medium story about HoneyBadgerSwap. Read it here: “HoneyBadgerSwap: Making MPC as a Sidechain,” published on April 22, 2021.
Watch a really great talk by Andrew Miller “MPC as a Blockchain Confidentiality Layer,” presented at the IC3 Blockchain Camp 2020, to understand the HoneyBadgerMPC protocol more.
If you are someone who would like to delve into the topic with textbooks, be sure to add the book “A Pragmatic Introduction to Secure Multi-Party Computation” to your reading list. The content is available in PDF.
Using MPC to Help Achieve Blockchain Privacy was originally published in Taipei Ethereum Meetup on Medium, where people are continuing the conversation by highlighting and responding to this story.
👏 歡迎轉載分享鼓掌
同時也有1部Youtube影片,追蹤數超過47萬的網紅NiceChord (好和弦),也在其Youtube影片中提到,好和弦頻道沒有開啟 YouTube 廣告,因此我不會從 YouTube 這邊得到任何收入,如果你覺得好和弦的課程有幫助到你,請你考慮購買「家庭號大包裝」來支持好和弦,讓好和弦能夠繼續提供免費的教學給所有人!到以下的連結喔: 好和弦 240 集家庭號大包裝:https://gumroad.com/l...
「mpc教學」的推薦目錄:
- 關於mpc教學 在 Taipei Ethereum Meetup Facebook 的精選貼文
- 關於mpc教學 在 Facebook 的精選貼文
- 關於mpc教學 在 Facebook 的最佳解答
- 關於mpc教學 在 NiceChord (好和弦) Youtube 的最讚貼文
- 關於mpc教學 在 [教學] MPC-HC硬解相關設定以及常見Q&A - 精華區AVEncode 的評價
- 關於mpc教學 在 [淘兒音樂] AKAI MPC BEATS 教學1 - 功能介面介紹(適用MPK ... 的評價
- 關於mpc教學 在 MPC手只打鼓免費線上教學第一集 - YouTube 的評價
- 關於mpc教學 在 馬特音樂- MPC Beats 教學影片創作從這開始 - Facebook 的評價
- 關於mpc教學 在 馬特音樂- MPC Beats 教學影片創作從這開始 - Facebook 的評價
- 關於mpc教學 在 mpc-hc設定的評價和優惠,PTT 的評價
- 關於mpc教學 在 MPC-HC 輕巧乾淨的影音播放器 - Ptter 鄉民懶人包 的評價
- 關於mpc教學 在 8/1 手指鼓課程與數位理論~ — Ableton Live School數位音樂 ... 的評價
- 關於mpc教學 在 MPC-BE下載YouTube影片@ 軟體使用教學:: 隨意窩Xuite日誌 的評價
- 關於mpc教學 在 [教學] MPC-HC硬解(DXVA)相關設定以及常見Q&A - PTT數位 ... 的評價
mpc教學 在 Facebook 的精選貼文
高雄場 ! 今天五點 線上首播 :)
mpc教學 在 Facebook 的最佳解答
秋甚湯宇 follow
4/16 Fri. MUSE Taichung live set
#Ugvboyz #UVB #Ungovernabledjstudio #Dj/黑膠刷碟/數位MIDI編曲/MPC/Launch Pad教學 #DJ器材/場地租賃 #派對籌劃 線上諮詢 http://bit.ly/UVBstudio
mpc教學 在 NiceChord (好和弦) Youtube 的最讚貼文
好和弦頻道沒有開啟 YouTube 廣告,因此我不會從 YouTube 這邊得到任何收入,如果你覺得好和弦的課程有幫助到你,請你考慮購買「家庭號大包裝」來支持好和弦,讓好和弦能夠繼續提供免費的教學給所有人!到以下的連結喔:
好和弦 240 集家庭號大包裝:https://gumroad.com/l/NCFamilyPack240
好和弦家庭號大包裝(中國大陸):http://www.upchord.cn/downloads/nicechord/
好和弦 Instagram:https://www.instagram.com/nicechord_official/
好和弦 Wiki:http://wiki.nicechord.com
其他你可以買的東西:https://gumroad.com/wiwikuan
好和弦官方網站:http://NiceChord.com
官大為:http://WiwiStudio.com

mpc教學 在 [教學] MPC-HC硬解相關設定以及常見Q&A - 精華區AVEncode 的美食出口停車場
放在小論壇上的那篇
由於改版限制會員才能觀看文章
從mpc-hc估狗的第1頁掉到第9頁去了
大概不久就會從估狗消失覺得有點可惜
文章內容也改了很多
給有需要硬解的初心者參考
設定值以硬解以及mpc-hc自己的decoder為主不安裝ffdshow/Haali
安裝設定步驟很簡單
是我自己在用的設定
Q&A則是自己常見到大家在問有關mpc-hc/字幕等方面
還有自己遇過的問題加上最近板上學到的
以及一些老梗整理的大集合
自己想到的全打進去了
應該是還滿完整的
有沒有在用硬解都可以看看
也許你跟我以前一樣有一些不知道的事XD
==本文開始=================================================================
【軟體名稱】:Media Player Classic HomeCinema
【軟體語言】:多國語言
【檔案格式】:.7z壓縮包
【檔案大小】:?MB
【解壓密碼】:無
【下載位置】:https://xvidvideo.ru/media-player-classic-home-cinema-x86-x64/
【軟體介紹】:如下
【教學】:
如果您發現觀看1080p的高畫質影片CPU使用率偏高
電腦以及播放軟體頓頓的
那麼您可以考慮使用MPC-HC這一個設定介面簡單明瞭的播放軟體來開啟硬體加速[DXVA]
也就是讓顯示卡幫忙解碼來降低CPU使用率
俗稱硬解
首先您的顯示卡必須要是以下條件
* ATI Radeon™ HD, ATI HD3850/3870/4850/4870, AMD Hybrid CrossFireX™ 780G
series for H.264 & VC-1
* nVidia GeForce 8500, 8600, 9600 or better
才能夠開啟硬體解碼
也可以使用DXVA Checker來查看是否支援硬解
可參考此網頁的詳細介紹
https://www.pczone.com.tw/vbb3/thread/67/143719/
如果條件符合
那麼在開始之前請您先移除之前安裝的所有編碼包如K-Lite or ffdshow以及VobSub等
避免混亂或衝碼
一、需要軟體
1.MPC-HC
請至https://xvidvideo.ru/找最新版下載
版本更新相當快
最快甚至一天之內就更新一次
因此個人認為是不一定需要裝ffdshow
由於目前許多編碼工具尚未有x64版本所以無論您的System是win7x64/32還是XP
都推薦您下載Media Player Classic HomeCinema x86 (Complete package)
要用安裝版或免安裝隨您高興(推薦免安裝"Without installer")
2.DirectX End-User Runtime Web Installer
HC下載頁面有提供微軟網頁連結(您也可以直接到微軟去抓)
3.Real Alternative Lite
https://www.free-codecs.com/download/Real_Alternative_Lite.htm
有MPC-HC直接裝Lite版(HC內建解Real功能不太夠)
二、安裝
1.解壓縮MPC-HC資料夾放在您想要的位置
2.安裝DirectX End-User Runtime Web Installer
3.安裝Real Alternative Lite(狂按下一步即可)
三、設定
1. 打開MPC-HC
2. View -> Options 左上Player -> Store settings to .ini files 打勾套用確定
3. View -> Language -> Chinese(traditional) 打勾
4. 檢視 -> 設定選項 -> 格式 點視訊
5. 播放 -> 勾選自動載入字幕
6. 輸出 -> XP選VMR9無轉換 win7&vista選EVR自訂 Real跟Quick選DirectX9
替代式垂直同步打勾
7. 內部篩選器
左邊來源分離器取消勾選RealMedia
右邊解碼器取消勾選RealAudio/Video WMV1/2/3 共3個
8. 字幕
最大材質解析度Desktop
緩衝時允許動畫跟進位2的乘方取消勾選
9. 套用 -> 確定
10.檢視 -> 繪製器設定 -> 垂直同步 -> 第一項"垂直同步"取消
您已經完成基本設定
註:
Q1:為什麼字幕都沒有特效?
A:由於特效對CPU負擔非常的重 建議您依個人CPU等級斟酌開啟
1.打開MPC-HC
2.檢視 -> 設定選項 -> 字幕 -> "緩衝時允許動畫"打勾
3.套用確定
4.重新開啟您的影片
但是這種設定有時會因為特效產生字幕閃爍的問題
雖然把緩衝調大可以獲得改善 不過在下並不確定是否有什麼不良影響
還有一種設定是將 "緩衝時允許動畫"不勾 "預先緩衝的子畫面數目"設定為0
原則上可以勝任大多數的播放工作
但是目前也已經發現這樣的設定會直接因為某些特效
使得影片直接掉格(也就是不同步)
所以到底要怎麼要設定會最好?
老實說在下也不清楚
另外這些不良反應是不是因為在下的CPU不夠好所造成這就不得而知了
最後一種方法就是直接改變renderer為Overlay
搭配DirectVobSub來觀看影片(詳見Q12)
但是因為DXVA跟DirectVobSub衝突
所以這種方案沒辦法硬解!
Q2:為什麼字幕的字型感覺不太好看?
A:有以下四種可能的情況
1.字幕檔副檔名為ass/ssa
可能是您未安裝相關字型檔案
請從影片來源處安裝[Font]相關檔案於您的作業系統
2.字幕檔副檔名為srt
2-1.打開MPC-HC
2-2.檢視 -> 設定選項 -> 字幕 -> 預設樣式
有許多選項可以設定
由於個人喜好不同因此不作建議設定
需要注意的是簡體字型代號134 繁體字型代號136
或是皆選取DEFAULT (1)
2-3.完成設定後 套用 確定
2-4.在影片畫面中按滑鼠右鍵 -> 字幕 -> 重新載入
3.字幕檔副檔名為sub/idx
此類型字幕為圖片所構成因此無法改變
4.以上1.2.3.都設定好了沒有任何改變
字幕早已內嵌在影片檔中(已成為畫面的一部分) 無法消去 編輯
播放影片時按滑鼠右鍵 字幕那欄若為灰白色無法點選則為此種影片
*若是需要固定每一次播放影片字幕的字型大小邊框陰影邊界
現在只要在2.設定好 點選MPC-HC的標題列 播放 -> 字幕 -> 預設樣式 打勾
就可以維持住設定 不論哪一種字幕檔都適用(除了4.)
缺點是pos/fad(註解/特效之類的)位置會亂跑
Q3:字幕可以移動到只顯示在視訊畫面內嗎?
A:檢視 -> 設定選項 -> 字幕 -> 預設樣式 放置字幕於視訊畫面相對位置
從方形選取改為勾
Q4:我的視訊檔案內/外掛多個字幕檔該如何切換?
A:按下"s"鍵即可
Q5:可以在播放視訊檔案完畢之後自動播放該資料夾的下一個視訊檔案嗎?
A:播放 -> 播放完後 -> 播放資料夾內的下一段
Q6:為什麼當我選擇"檔案 -> 最近的檔案"裡面含有日文路徑等檔案名稱
顯示"?"號並且無法開啟?
A:請使用記事本打開mpc-hc.ini另存新檔為Unicode格式
覆蓋原本的ANSI格式即可正常使用
*若是存為UTF-8 mpc-hc仍舊無法辨識
Q7:當我播放視訊檔案時畫面左上角總是出現藍底白字的小對話框
顯示檔案名稱或是暫停音量調整等操作
能夠取消該對話框不要顯示嗎?
A:檢視 -> 設定選項 -> 播放程式 顯示OSD取消打勾 套用 -> 確定
並且重新啟動程式即可
Q8:如何截圖?
A:第一次截圖請按Alt+I來設定預設儲存圖片目錄以及圖片格式(bmp/jpg/png)
之後只要按F5即會依照此設定截取圖片
Q9:字幕時間軸有誤該如何調整以方便其他調整時間軸軟體一次修正字幕檔案?
A:影片播放時按下F1可提前字幕0.5秒的出現時間/F2則是延遲0.5秒
*若是需要改變預設0.5秒的間隔可以到
檢視 -> 設定選項 -> 字幕 中的延遲間隔輸入設定毫秒數
Q10:為什麼字幕是亂碼?
A:字幕檔本身編碼有誤 最簡單的處理方式就是用記事本打開 另存新檔編碼為UTF-8
若使用ConvertZ或是其他編輯工具需要加入Unicode BOM再存為UTF-8才可正常顯示
Q11:我該如何保留我的設定值更新我的主程式?
A:在放置MPC-HC相關檔案的資料夾中留下mpc-hc.ini
其餘檔案刪除並以新檔案覆蓋即可
Q12:為什麼已經用了以上設定播放影片還是很不順很頓?
A:很遺憾您的硬體設備恐怕不足 不過還是有方法可以嘗試
(本方案無法硬解 除非您不需要觀看字幕)
1.打開MPC-HC
2.輸出 -> 選擇"覆疊合成器"
3.播放 -> 取消勾選自動載入字幕
4.套用確定
5.離開MPC-HC
6.安裝DirectVobSub
https://www.free-codecs.com/download/DirectVobSub.htm
全按下一步即可
或是換解碼器如CoreAVC搭配CUDA 或Divx H264等.. 可以嘗試看看
將內部解碼器取消勾選H264/AVC(FFmpeg/DXVA)套用確定
再安裝該decoder 即可使用 可以在播放影片時按滑鼠右鍵
篩選器 來確認是否使用 可以參考實驗結果
https://www.pczone.com.tw/vbb3/post/1073541/327/
來做選擇
*但是個人使用心得是儘管外傳CUDA解碼的色澤表現較為優異
不過有時會發生閃黑屏或是干擾到音訊解碼造成爆音等不可知的異常現象
然而DXVA是能夠勝任上述部分影片正常播放的
因此若是要使用硬解
在下仍然推薦DXVA為最好的選擇
參考資料:
https://www.pczone.com.tw/vbb3/thread/67/143719/
PTT AVEncode板
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.222.12.145
... <看更多>