<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alexander Kopnin on Medium]]></title>
        <description><![CDATA[Stories by Alexander Kopnin on Medium]]></description>
        <link>https://medium.com/@alkopnin?source=rss-661951ac9ce1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*h0ANq50UUHNavAam5fOpIA.jpeg</url>
            <title>Stories by Alexander Kopnin on Medium</title>
            <link>https://medium.com/@alkopnin?source=rss-661951ac9ce1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 11:54:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alkopnin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Post-Covid E-Commerce]]></title>
            <link>https://alkopnin.medium.com/post-covid-e-commerce-fd86ffadebce?source=rss-661951ac9ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd86ffadebce</guid>
            <category><![CDATA[e-commerce-solution]]></category>
            <category><![CDATA[streaming]]></category>
            <category><![CDATA[webrtc]]></category>
            <category><![CDATA[hls]]></category>
            <category><![CDATA[rtmp]]></category>
            <dc:creator><![CDATA[Alexander Kopnin]]></dc:creator>
            <pubDate>Wed, 03 Feb 2021 16:54:54 GMT</pubDate>
            <atom:updated>2021-02-03T16:54:54.092Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part I: Fundamentals of Media Streaming Technology</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lvxAqbeGKAIh7HCHvUHNLQ.jpeg" /></figure><p>The recent pandemic situation has significantly impacted users’ behavior on the Internet and their expectations from web services. There is a new, strong requirement to integrate media technologies into even well established businesses, but despite the fact that these technologies are used a lot in telecoms, streaming, and e-learning platforms, they still remain too complicated to be embraced more widely.</p><p>The article introduces the architecture design for a post-covid e-commerce. The aim here is to debrief fundamentals of media and share personal experience in the e-commerce solution design.</p><p>There are several parts in the series:</p><ol><li>Introduce the fundamentals of streaming technologies and media pipeline</li><li>Drill down the architecture design of media streaming technologies</li><li>Debrief a content management platform and video generation pipeline</li></ol><h4>Overview</h4><p>A global e-commerce platform is a complex IT ecosystem that includes front and back offices to provide a vendor’s portal, catalog management, multi-tenant data privacy, services to manage order, calculate taxes, control drop shipping itineraries, build prediction models based on users’ behavior and many other services. An integration of media streaming capabilities comes through the entire e-commerce stack therefore it’s not only multiple multimedia technologies to be adopted, but also a variety of strong technical and functional requirements to meet and hence it becomes a very sophisticated task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gngc1CzPrFqd9JayoJNXnQ.png" /></figure><p>A streaming platform designer should be conscious on selecting target use cases and appropriate technology to meet requirements because besides technical complexities it also has a high infrastructure cost. The low latency playback, effective scaling and video content management system are all difficult to implement efficiently. Here a list of core use cases that we picked up for the post-covid e-commerce platform:</p><ul><li>A user does online review of a set of products in a live stream;</li><li>Users jointly discuss a set of products in a small private group of friends;</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0WvLrwRm9kdn0DQbJh0-FA.png" /></figure><p>Both use cases are <em>Real-Time Conferencing</em> scenario and have similar functionally on a first look, but they are absolutely different technologies and requirements. They are a mix of media technologies, and therefore it’s worth to start with an overview of possible streaming modes, introduce fundamental definitions, and explain a general media pipeline.</p><p>The noted use cases are <em>live </em>and <em>group call streaming</em> modes of the r<em>eal-time conferencing </em>scenario<em>. The live streaming</em> session requires a single event host who streams video/audio to others. There is always a single media stream per event and there is an unlimited number of clients spread across the world, furthermore they might not be even authenticated. Moreover, the stream from the host to clients should be delivered with a constant predictable delay that doesn’t exceed 8–12 secs. The <em>Live Streaming</em> has to be ready for massive scale thus it always works in tandem with another streaming scenario, —<em> video on demand</em>.</p><p>A <em>group call streaming</em> mode is a session with a number of duplex connections, so each user receives the others’ streams and shares his/her own at the same time. The number of connected users is limited to a small group, they are usually authenticated and call from different platforms which means that any mobile platform &amp; web-browser should be supported.</p><h4>Media Playback Scenarios</h4><p>There are 2 main media playback scenarios: video on demand &amp; real-time conferencing. The video on demand (VOD) is a scenario when a user requests pre-generated video to play it on the client’s side. The video is always packed into a <em>media</em> <em>container</em> along with additional metadata to be able to read the content inside. The media stream itself might be additionally protected with digital rights management technologies (DRM). This flow is always used when you are watching another episode of your favorite series on Netflix.</p><blockquote>The most widely popular media containers are <strong>AVI, MOV, MP4</strong>. The media container is a class of computer files that allows data streams (audio/video) to be embedded into a single file. However, not every media container is suitable for web streaming, there are other containers to be considered, — <strong>fMP4, MPEG-TS, WebM</strong>.</blockquote><p>There are 2 possible implementations for the VOD scenario:</p><p><strong>Progressive playback — </strong>the most common method for transferring files over the Internet, all static contents use this transferring. The web-app downloads the whole media first and then it can be played from any point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pAYqSXw0SUbXOwvN2jD_Iw.png" /></figure><p><strong>Adaptive streaming</strong> — to contrast the progressive playback a media is never stored on a local drive. The technology is designed to deliver the video to a user in the most efficient way according to his/her bandwidth. Users watch the media content with the highest possible quality all the time. The media is delivered using independent fragments of information, — <em>segments/chunks. </em>User may play content as soon as the initial 2–3 chunks of the media have been received (<em>pre-buffering</em>). The player automatically changes the quality when max capacity of its buffer is reached.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TKT8CaKtj-PVXBZSwPqmUw.png" /></figure><p>Another media scenario is the <strong>real-time conferencing</strong> where a group of people gear up in a virtual room that can be additionally secured by an authorization policy. Various real-time conferencing modes use different underline technologies.</p><p>In a group call mode users receive audio/video streams from each other where on a live event they receive it from the host only. Media containers are optional for real-time conferencing scenarios and it depends on the specification of transport protocols. For example, the real-time conferencing over WebRTC uses containerless approach and additional P2P encryption to protect content from intermediators. The two devices need to be able to agree upon a mutually-understood codec for each track so they can successfully communicate.</p><blockquote>While compression is always a necessity when dealing with media on the web, it’s of additional importance when videoconferencing in order to ensure that the participants are able to communicate without lag or interruptions. Of secondary importance is the need to keep the video and audio synchronized. — @Mozila</blockquote><h4>A Streaming Pipeline</h4><p>Any streaming starts with raw media content that is either captured directly from a camera or with other digital recorders. The input can’t be transferred over the Internet so encoder, multiplexor and packager perform post-processing of raw bytes array to algorithmically reduce its size and optionally pack it into a certain media container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6MK6H_JrRWW_zL3lvGEYQ.png" /><figcaption>A Media Streaming Pipeline</figcaption></figure><p>Extra functions might be applied during encoding and decoding phases to incorporate other media data or even use machine learning technology.</p><blockquote>There is emerging standard by W3C to integrate special processors as a part of WebRTC protocol: <a href="https://w3c.github.io/webrtc-insertable-streams/">WebRTC insertable streams</a></blockquote><p>There are such media <em>codecs </em>as h264 (AVC), h265(HEVC), VP8, VP9, OPUS, AAC, .. that implement math compression algorithms to be able to transfer content over the Internet efficiently to even low powered devices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BW26hAmHAsssXGeqKZagSQ.png" /></figure><p>I’ve decided to stop here and split the material on multiple posts for simplicity. The article introduces the fundamentals of media streaming technology so it should help architects to understand such terms as codecs, media containers, streaming pipeline and how all these work together.</p><p>In the next several posts I will drill down and cover a high-level architecture for different streaming modes as well as content management platform for the post-covid e-commerce platform.</p><p>Special thanks to <a href="https://www.linkedin.com/in/ivan-burtsev-985323106/">Ivan Burtsev</a> for technical review.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd86ffadebce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Privacy preserving digital voting (II)]]></title>
            <link>https://alkopnin.medium.com/privacy-preserving-digital-voting-ii-7c24f2cd6716?source=rss-661951ac9ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c24f2cd6716</guid>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[digital-identity]]></category>
            <category><![CDATA[ssi]]></category>
            <category><![CDATA[voting]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Alexander Kopnin]]></dc:creator>
            <pubDate>Mon, 14 Dec 2020 09:48:22 GMT</pubDate>
            <atom:updated>2021-02-01T20:50:54.465Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bcpGq0hQlcHQtI9w8hSFfw.png" /></figure><h3>Privacy preserving digital voting</h3><h4>Part II: E<em>xperimental digital voting in Zug, Swiss</em></h4><p><em>The part I that introduces general privacy preserving techniques to design voting platform can be found </em><a href="https://alkopnin.medium.com/privacy-preserving-digital-voting-i-6e6320d7f051"><em>here</em></a><em>;</em></p><p>The Swiss solution treat model in a similar way to microservices but are cognisant of the design limitations inherent to a decentralized, consensus driven, data replication architecture. The decentralized technology has been identified as efficient tool to construct electronic voting solutions so they imply its distributed data storage is shared across multiple nodes. It increases level of trust to the system in general and provides better auditability, integrity properties against a centralised approach.</p><p>There are few important terms to note before proceed with architecture definition:</p><p><strong>Digital Identity.</strong> The identity instance therefore is a composition of a wallet with cryptography key and identity assertions (credentials) that allow the identity owner to control how the identity is established and proof eligibility to vote.</p><p><strong>Distributed Ledger Technology (DLT). </strong>A<strong> </strong>decentralised network of independent computers that are able to agree on an immutable record of the sequence and outcome of transactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*av39aoX48JypnsBym9XE1Q.png" /></figure><p>The model decomposes the ideas of DLT into layers. At the centre of the model is kind of <strong>Consensus Computer</strong>. The idea is that instead of processing being done in one place (by a single system that everyone trusts), processing is duplicated and done in many places so that trust does not need to be placed in a single system or organisation. The consensus, communications and control layers are <strong>non-functional</strong>. These layers determine the performance, scalability and underlying security of the platform.</p><p><strong>Cryptographic blinding techniques. <br></strong>Homomorphic Encryption (+) is a crypto-system that may execute simple mathematical operation under encrypted data. For example, in such crypto-system the multiplication of encrypted data is equal to encrypted sum of its pre-images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*toEXHHmcf7MmvU0KgJovRA.png" /><figcaption>plaintext for <strong>x is 7,</strong> <strong>y is</strong> <strong>8</strong>; multiplication of x*y is equal to sum of 7+8 in encrypted form</figcaption></figure><p>Zero-Knowledge Proof is a method where one party can prove to another party that a given statement is true, without conveying any information apart from the fact that the statement is indeed true. ZKP is a sort of function that on some inputs responds with true or false.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ckiCg-AoddITKaPiw1KjYw.png" /><figcaption>Will be encrypted Z equal to 15 if I decrypt it?</figcaption></figure><h4>A new voting poll</h4><p>An electronic voting system is a distributed network protocol that includes few sequential steps with strong security requirements for each.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YcfIOLEUMn4ubRFcj1Qetg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x1aIaCMsx0LnO_8a6x86Tg.png" /></figure><p>The authority initiates a new round of voting by sending all necessary information about what will be voted on to the appointed registrar. The registrar creates a new poll (with a list of questions and choices, when that vote opens and closes, etc.) on the blockchain and assigns the voting executors, polling stations and committee. The committee generates secret key that obtains Homomorphic properties and publishes its public part.</p><blockquote>The platform is based on Paillier crypto-system that is homomorphic by addition (+) operation and has blinding properties, so means that same value will always produce different encryption results.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3n99efHN_xQu6A_RN430_Q.png" /></figure><p>A voters use dedicated polling stations to pass eligibility check using digital identity and to register intention to vote. The polling station authenticates voter using special credentials that are issued and signed by legal authority beforehand. The every voter also generates personal ESDSA key pair during this phase and registered public part on the ledger via polling station. This key never leaves private wallet and it’s used to prove ballot ownership by signing it with private part.</p><p>If user successfully completes this step her/she obtains anonymized personal ballot uploaded on the ledger.</p><blockquote>The <a href="https://alkopnin.medium.com/self-sovereign-identity-81f28d0772d2">SSI technology</a> has been used to prove eligibility to check. The model is based on <a href="https://alkopnin.medium.com/privacy-preserving-digital-voting-i-6e6320d7f051">Trusted Third Party</a> approach so means the correlation between anon id and the vote result is still possible if Polling Station &amp; Committee are colluded.</blockquote><blockquote>However, this can be address by another cryptography techniques in a future: Cryptography Accumulators.</blockquote><h4>The voting step</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eTobNVDzmJAC_MrPzirIvw.png" /></figure><p>At these steps the ledger already contains: (1) Poll with associated list of questions; (2) Poll’s Paillier public key issued by Committee; (3) Voters’ personal ballots; (4) List of anonymized ids and associated voter’s public keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rZEnocQHPtHj_scrUxixHA.png" /></figure><p>The beatify of DLT is that preparation and real voting are totally independent steps. So a voter can choose any instance of blockchain to cast the vote. The wider network the more trust. The voter application is a stateless service that only provides interface to core ledger. It doesn’t need to know voter’s identity or manage secure keys.</p><p>The voter downloads all the necessary details, votes and encrypts answers with committee’s public key. Afterwards, voter signs ballot using individual private key and adds it to the blockchain. The votes are then aggregated into decentralized baskets and replicated between network nodes on the blockchain.</p><h4>The results sum up</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*58oQHjT-tWnlHYuK1E4UBw.png" /></figure><p>Once voting is over, the committee retrieves all anonymized and encrypted ballots from the ledger, checks their authenticity by verifying all signatures (and a number of cryptographic proofs), then simply sum ups the results.</p><blockquote>The blinding cryptography plays here! The homomorphic by addition property gives nice capability to work with encrypted votes. Anyone who has access to the ledger is able to sum up votes without decrypting pre-images &amp; identifying voters.</blockquote><blockquote>The outcome of such operation is always results of the poll, <strong>but </strong>it’s still encrypted with secret committee key.</blockquote><p>When sum up is finished, the committee submits the decrypted results back to the ledger <strong>and </strong>also provides zero-knowledge proof of equivalents between encrypted sum of votes and published results.</p><h4>The results verification</h4><p>The verification takes time cause every network participant pulls all the votes out and runs verification that includes: (1) sum the votes in encrypted form using homomorphic property of Paillier (2) verify ZKP using decrypted results (published by Committee) and manually calculated (but still encrypted) sum of the votes.</p><p>The Committee can’t alter the votes, because the verifier always re-calculates it from scratch.</p><h4>Epilogue</h4><p>Despite the fact that the project has been deployed as an experiment, it successfully proved sustainability with certain security assumptions. The approach is respectful of privacy although the level of privacy obtained is dependent on the implementation of the crypto-system, network security and it requires hard research on new vectors of attack, like voters de-anonymisation, voting correlation, fake users, keys rotation, etc.</p><p>The diagram below depicts deployment model that includes multiple clouds and few business services who implement Trusted Third Party technique.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lWdSPanmMXMuj3TYRy2Txg.png" /></figure><p>Thank you for reading.</p><h4>REFERENCES:</h4><ol><li>Aleksandr Kopnin, Oleg Sesov. <a href="https://www.linkedin.com/in/kopnin/detail/overlay-view/urn:li:fsd_profileTreasuryMedia:(ACoAAA2DV9UBZbJnGLbUvAO6-Y1XPsekh3j4C1Y,1605093045956)/?lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_view_base%3BzzDKoLhdSpGL5YeyhjLp6Q%3D%3D&amp;licu=urn%3Ali%3Acontrol%3Ad_flagship3_profile_view_base-featured_item_detail_view">Verifiable Electronic Voting System</a>, 2016</li><li>zk-paillier. Paillier cryptosystem zero knowledge proofs written in Rust, <a href="https://github.com/ZenGo-X/zk-paillier">https://github.com/ZenGo-X/zk-paillier</a></li><li>vice-city. Two Party Distributed RSA Modulus Generation, threshold Paillier cryptosystem, <a href="https://github.com/ZenGo-X/vice-city">https://github.com/ZenGo-X/vice-city</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c24f2cd6716" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Privacy preserving digital voting (I)]]></title>
            <link>https://alkopnin.medium.com/privacy-preserving-digital-voting-i-6e6320d7f051?source=rss-661951ac9ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e6320d7f051</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[voting]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[digital-identity]]></category>
            <category><![CDATA[ssi]]></category>
            <dc:creator><![CDATA[Alexander Kopnin]]></dc:creator>
            <pubDate>Mon, 07 Dec 2020 11:57:39 GMT</pubDate>
            <atom:updated>2021-02-01T20:51:30.089Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MmXtmWy5FOVe-rhux0Fh4g.png" /></figure><h3>Privacy preserving digital voting</h3><h4>Part I: Privacy Preserving Techniques</h4><p>A secure election process is an important prerequisite not only for democracy, but also to construct robust and efficient solutions for the industry. The electronic voting is an active field of research. There are many proposals that were already deployed and tested in practice, e.g the DRE system deployed in Brazil [1] and the internet voting carried out in Estonia [2]. However, it’s not enough to just accept votes remotely, the platform has to be ready to scale on city, state and even country levels. The results must be <em>verifiable</em>, <em>auditable; </em>the voters have to be <em>eligible </em>and their votes stay <em>private</em> <em>and</em> <em>unforgettable</em>.</p><p>Many challenges ahead to design strong enough voting solution, but pandemic underscores the needs in such systems.</p><p>I would like to share my experience in designing and deploying production ready voting system. The part I introduces general privacy preserving techniques related to voting platforms; the <a href="https://alkopnin.medium.com/privacy-preserving-digital-voting-ii-7c24f2cd6716">part II</a> provides end-to-end design for Zug, Swiss solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qIOpvELEZyiDyOh4mrQnrg.jpeg" /></figure><h4>Voting System Design</h4><p>An electronic voting system is a network protocol which results in having a sequential flow to achieve uniform view on the bulletin board. A general approach is to create a new poll and a bulletin board where it is possible to cast the votes, then calculate and publish final results and, most importantly, to verify the correctness of such results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YcfIOLEUMn4ubRFcj1Qetg.png" /><figcaption>The voting workflow</figcaption></figure><p>The protocol itself is managed by a model where at least the following business roles usually exist:</p><ul><li><em>Voter </em>is a person who holds a digital ID and eligible to vote</li><li><em>Registrar </em>is an authority who initiates and manages a voting poll, inc. final results sum up</li><li><em>Voting Gateway</em>, sometimes referred as polling station, is an authority that provides interface for voting. It can be Government web portal or any independent organisation (school, university or even library)</li></ul><p>There are 2 global categories of privacy that can be considered. The first one is the voters confidence about anonymity of casted votes, unlinkability between different polls and verifiability of final results. The second one is a voting process itself, where the protocol has to tolerate to colluding authorities, prevent early access to results and ensure ballot secrecy and unforgeability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NNtACJTlsM6BZ5t6mU-c2Q.png" /></figure><h4>Privacy Preserving Techniques</h4><p>A bulletin board construction is a significant and hard process for any voting protocols. An access to a poll is always regulated by dedicated authority to prevent fraud. Thus the voter has to be eligible to participate and at the same time the system must guarantee that it’s not possible to correlate identity and casted vote. However, during the eligibility check a voter normally reveals a personal information and gets some virtual ticket or ballot to cast the vote.</p><p>This section provides some technics that have been proposed to address this challenge.</p><p><strong>Trusted Third Party -</strong> a really standard and well-known approach is to have dedicated trusted third parties who split the voting responsibility. Security relies on a number of authorities and the protocol assumes that the polling station, commissioning service and registrar are different and isolated parties. The casting vote and eligibility check are managed by different entities</p><p><strong>Verifiable Shuffle/Mixing -</strong> Another way to implement a universally verifiable election protocol is to use verifiable shuffling technique. The shuffle protocols are constructed entirely from elementary arithmetic operations and guarantee same kind of random, yet verifiable permutation of an input sequence. The voting systems usually intend shuffle protocol within a mixing center and rotate either encrypted votes or ballots.</p><p><strong>Multi-party computation (MPC) -</strong> perfect ballot secrecy means that no information is revealed about who sent which message, no matter how many parties are corrupt. Significant contributions have been done by Kiayias and Yung [3] and Groth [4]. Kiayias and Yung introduced the notion of perfect ballot secrecy together with <em>self-tallying </em>and <em>dispute-freeness</em>. Self-tallying means there is no need for authorities to tally the votes. Dispute-freeness says that anybody may verify that indeed the parties do follow the protocol. The protocol is a modification of the Trusted Third Party strategy and assumes authenticated public channel for every participant. The trusted third parties are involved to construct anonymous channel, but not to generate ballots. The protocol is self-contained and excludes role-based model.</p><p><strong>Ring Signatures -</strong> a ring signature scheme can be viewed as alternative to group signature schemes. In group signatures, we have that any member of a group of n signers is able to generate a signature such that any public verifier can determine if the signature was generated by a group member. They are typically achieved by generating a group secret element and then sharing it out using either a centralized method, for example through the group manager, or by using distributed methods. One of the ring signature benefits is the construction of <em>ad hoc </em>groups and the avoidance of single group manager. Some works apply modified versions of ring signatures as linkable and one-time signatures to solve the double spend problem in the underlying voting protocol by linking two signatures of the same person without revealing the subjacent identity. Using ring signatures, the voting process is significantly simplified. There are no ballots in the scheme, and the voter joins an authenticated channel, proceeds with the eligibility check and then registers his personal public key. The set of keys is published to an immutable data storage alongside with the voting options. Every voter anonymously signs the desirable choice on behalf of the constructed group. The tallying is trivially carried out by simply verifying all received linkable ring signatures, dropping the invalid or linked ones, and tallying the remaining ones according to their signed messages.</p><p>A recent result from another research by Rafael, Vadim, Gregory &amp; Gregor[5] proposes the construction of a quantum-resistant scheme based on lattices. It uses ZKP to prove that each vote is well formed and also to allow authorities to recommit to votes, while still possible to prove in zero knowledge that it is consistent with previous commitments.</p><p><a href="https://alkopnin.medium.com/privacy-preserving-digital-voting-ii-7c24f2cd6716">In the next part</a>, I will provide overview of end-to-end design for experimental digital voting project in Zug, Swiss.</p><h4>REFERENCES</h4><ol><li>Diego F. Aranha and Jeroen van de Graaf. The good, the bad, and the ugly: Two decades of e-voting in brazil. <em>IEEE Security &amp; Privacy</em>, 16(6):22–30, 2018.</li><li>Priit Vinkel. Internet voting in estonia. In Peeter Laud, editor, <em>Information Security Technology for Applications</em>, pages 4–12, Berlin, Heidelberg, 2012. Springer Berlin Heidelberg.</li><li>Aggelos Kiayias and Moti Yung. Self-tallying elections and perfect ballot secrecy. In David Naccache and Pascal Paillier, editors, <em>Public Key Cryptography</em>, pages 141–158, Berlin, Heidelberg, 2002. Springer Berlin Heidelberg.</li><li>Jens Groth. Efficient maximal privacy in boardroom voting and anonymous broadcast. In Ari Juels, editor, <em>Financial Cryptography</em>, pages 90–104, Berlin, Heidelberg, 2004. Springer Berlin Heidelberg.</li><li>Rafae ̈l del Pino, Vadim Lyubashevsky, Gregory Neven, and Gregor Seiler. Practical quantum-safe voting from lattices. Cryptology ePrint Archive, Report 2017/1235, 2017. <a href="https://eprint.iacr.org/2017/1235.">https://eprint.iacr.org/2017/1235.</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e6320d7f051" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decentralizing Data Privacy]]></title>
            <link>https://alkopnin.medium.com/decentralizing-data-privacy-1f8630c802ea?source=rss-661951ac9ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f8630c802ea</guid>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Alexander Kopnin]]></dc:creator>
            <pubDate>Fri, 11 May 2018 07:23:16 GMT</pubDate>
            <atom:updated>2018-05-12T06:18:13.185Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GNMlJRGUH2yp-6XgrVtA0Q.jpeg" /></figure><h4>Identity-based proxy re-encryption scheme</h4><p><em>cryptography level: </em><strong><em>intermediate</em></strong></p><p>Many articles were published resently where Blockchain and DLT systems criticized from data privacy. Such law as GDPR, HIPPA are formulated to prevent personal data storing directly on the blockchain. This prohibits us from using this technology to its full potential. However, Blockchain is a technology and as many other it’s a part of architectural design.</p><p>Blockchain is a distributed network and data written on it will be available for other participants. Thus, If application records health check results directly on blockchain to increase efficiency of data processing between group of physicians, it means that data will be available for other participants and application’s owner itself. The article introduces re-encryption scheme where users are owners of their data. They decide who will have granted access.</p><p>Identity based proxy re-encryption (PRE) is a cryptographic method developed to delegate the decryption right from one party (the delegator) to another (the delegatee). Semi-trusted proxy can transform a ciphertext for Alice into another ciphertext that Bob can decrypt. However, the proxy can learn nothing about the corresponding plaintext. Encrypted data can be stored anywhere — in IPFS, Swarm, S3, Storj or any kind of decentralized or centralized storage. When storing the data, the users to whom they delegate access is not necessarily known in advance.</p><p>A naive solution for the secure access delegation problem would be to use conventional encryption techniques (e.g., AES, RSA) and to share the decryption key with the parties designated by the data owner. Symmetric encryption cannot be used alone, since it implies that the same key is shared between producers, owner and consumers or, at least, that for each piece of encrypted data, producers and owner agree on a key, which is extremely inefficient. With respect to public-key cryptography, the problem is that the producers do not necessarily know in advance who are the intended consumers of the encrypted information.</p><p>The rest of the article is organized as follows. It starts from “<em>Terms &amp; Definitions</em>” where briefly reviewed the preliminaries of pairing and IBE. Then explained how IBE works and finally PRE itself.</p><h4>Terms and Definitions:</h4><p><strong>Identity-based cryptography </strong>(IBE) is a type of public-key cryptography in which a publicly known string representing an individual or organization is used as a public key. The public string could include an email address, domain name, or a physical IP address. Usually PRE is built on top of IBE schema.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rZkgcRx7sV3aeJZwxm28UQ.png" /><figcaption>pic.1</figcaption></figure><p><strong>Pairing-based cryptography</strong> is the use of a pairing between elements of two cryptographic groups to a third group. Pairings allow for three-party mathematical protocols. Bilinear maps are the tool of pairing-based crypto (see pic.1). A pairing works on a special pairing-friendly elliptic curve. Weil pairing is sample of such bilinear map.</p><h4>Why pairing?</h4><p>To explain benefits of pairing cryptography let’s compare 2 different implementations of IBE to exchange messages encrypted by known ID (e.g email address).</p><p><em>Presets</em>: In both cases the central system <em>C</em> exist and it has PrivKey(<em>C) &amp; </em>PubKey<em>(C), </em>where public key is known to every user.</p><p><em>IBE over RSA:</em> <br><em>A</em>ll messages go through the <em>C. </em>Every user knows <em>only</em> PubKey(<em>C</em>) and encrypts the message with that public key. <em>C</em> decrypts the message, and re-encrypts it with the intended PubKey(<em>recipient</em>). If IBE implemented over RSA the <em>C</em> knows all user’s public keys.</p><p><em>IBE over Pairing</em>:<br>Each users obtain their PrivKey(<em>user)</em><strong> from <em>C</em>.</strong> To send an email, sender computes PubKey(<em>reciepent)</em> using recipient’s id (e.g email address) &amp; the PubKey(<em>C</em>).</p><p>In pairing model <em>C </em>not need to do anything in particular at the time the email is sent. This prevents <em>C</em> from becoming a network bottleneck when traffic increases.</p><h4>How IBE works?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*9QB7yb_TpXyTaX_EiNb32Q.png" /></figure><p>An IBE scheme uses a trusted third party called a Private Key Generator (PKG). To set up, the PKG generates a master secret and system parameters. The PKG may have many clients. Each client has some ID, which is simply a string that identifies it — e.g., the client’s email address. The main algorithms in IBE are as follows.</p><ul><li>Setup — generates public <em>params</em> and <em>master key</em> by given security input: <br>- [OUT] Select bilinear map <strong><em>e</em></strong> of two cyclic groups (<strong><em>G, Gt</em></strong><em>)</em> of prime order <strong><em>p</em></strong><br>- [OUT] Select random generator <strong><em>g</em></strong><em> </em>of <em>G<br>-</em> [OUT] Define hash function <strong><em>H</em></strong><em> </em>→ <em>G</em><br>- [OUT] Pick master key <strong><em>a</em></strong><em> </em>and set public key <strong><em>pk</em></strong> of PKG:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YPVRvZE9W6dq-2NEQNV5Ig.png" /><figcaption>Pick MK and calculae PKG’ public key</figcaption></figure><ul><li>Key-gen — generates User’s secret key by <em>params</em> &amp; existing <em>MK</em><br>- [IN] Identity string <strong><em>id</em></strong><em><br>- </em>[IN] Public <strong><em>params</em></strong> <br>- [IN] Master Key <strong><em>a</em></strong><br>- [OUT] Calculate Public (<strong><em>pk</em></strong>)<strong><em> </em></strong>&amp; Secret (<strong><em>sk</em></strong>) keys by <em>id</em>:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OrJGP77cfNUQLzgcB17H9g.png" /><figcaption>Shift id to required group G to get public key</figcaption></figure><ul><li>Ecryption — sender computes ciphertext <em>c</em> for message <em>m</em> by id<br>- [IN] Message <strong><em>m<br></em></strong><em>- </em>[IN] Identity string <strong><em>id<br></em></strong>- [OUT] Pick random <strong><em>r<br></em></strong>- [OUT] Cyphertext<strong> <em>c = (c1, c2):</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WEIcjOsNp27oQIXAxHG01Q.png" /><figcaption>r is used to randomize output</figcaption></figure><ul><li>Decryption — reciepent recovers <em>m</em> by cyphertext <em>c</em> and <em>id<br></em>- [IN] Encrypted message <strong><em>c = (c1, c2)</em></strong><br>- [IN] Identity string <strong><em>id<br></em></strong>- [IN] Recipient’ private key <strong><em>pk</em></strong> for <em>id</em> <br>- [OUT] Decrypted message <strong><em>m:</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*iTfLBg8C2A8ZTCuAslYgiQ.png" /></figure><p>PKG generates the private keys of all of its clients. IBE has two negative consequences: 1) private key escrow is inherent in this system — i.e., a PKG can easily decrypt its clients’ messages; and 2) the PKG must send client private keys over secure channels, making private key distribution difficult.</p><p>There are number of variant systems have been proposed which remove the escrow and improve weak sides.</p><h4>What is PRE?</h4><p>With the increasing privacy concerns over personal data, proxy re-encryption, in particular IBE proxy re-encryption schemes, will find more and more applications. For example, in the healthcare domain, many regulations, such as HIPPA, require that the patient is the owner of his personal health record and should control the disclosure policy for his Personal Health Record (PHR).</p><p>A PRE scheme can be classify by 3 categories: Directionality, Number of hops and Interactivity.</p><p><em>Directionality</em>: <br>A PRE scheme is unidirectional if the re-encryption keys enable the trans- formation of ciphertexts only in one direction, from delegator to delegatee, and is bidirectional otherwise.</p><p><em>Number of hops</em>: <br>PRE scheme is single-hop (or single-use) if a re-encrypted ciphertext cannot be re-encrypted again, while it is multi-hop (or multu-use) if ciphertexts are re-encryptable multiple times.</p><p><em>Interactivity</em>: <br>If the secret key of the delegatee is not needed in the re-encryption key generation process, then the scheme is not interactive (i.e., since he does not have to participate in the process). Otherwise, we say it is interactive.</p><p>There are 5 basic algorothms of PRE:</p><ul><li>KeyGen(<em>n</em>) → (<em>pkA</em>, <em>skA</em>)<em>. <br>The key generation algorithm </em><strong>KeyGen</strong> <em>outputs a pair of public and secret keys </em>(<em>pkA</em>, <em>skA</em>) <em>for user A.</em></li><li>ReKeyGen(pk<em>A</em>, <em>skA</em>, <em>pkB</em>, <em>skB</em>) → rk(<em>a</em>→b)<em>. <br>On input the pair of public and secret keys </em>(<em>pkA</em>, <em>skA</em>) <em>for user A and the pair of public for user B, the re-encryption key generation algorithm </em><strong>ReKeyGen</strong> <em>outputs a re-encryption key rk(a</em>→b)<em>.</em></li><li>Encryption(<em>pkA</em>, <em>m</em>) → <em>cA. <br>On input the public key pkA and a message m </em>∈ M<em>, the encryption algorithm </em><strong>Encryption</strong> <em>outputs a ciphertext cA </em>∈ C<em>.</em></li><li>ReEncryption(<em>rk(a</em>→b), <em>cA</em>) → <em>cB. <br>On input a re-encryption key rk(a</em>→b)<em> and a ciphertext cA </em>∈ C<em>, the re-encryption algorithm </em><strong>ReEncryption</strong> <em>outputs a second ciphertext cB </em>∈ C <em>or the error symbol </em>⊥ <em>indicating cA is invalid.</em></li><li>Decryption(<em>skA</em>,<em>cA</em>) → <em>m. <br>On input the secret key skA and a ciphertext cA </em>∈ C<em>, the decryption algorithm </em><strong>Decryption</strong> <em>outputs a message m </em>∈ M <em>or the error symbol </em>⊥ <em>indicating cA is invalid.</em></li></ul><p>There are many PRE algorithms exist. They have different properties and need to acheive specific requirements. BBS98 is an example of interactive, multi-hop algorithm, but it’s non-collusion resistant. AFGH is a non-interactive and single-hop.</p><p><em>Useful references</em>:</p><ol><li><a href="http://gas.dia.unisa.it/projects/jpbc/">jPBC</a> is library for pairing-based cryptography written in Java.</li><li><a href="https://medium.com/u/f8dca5fb5353"><strong>NuCypher</strong></a><strong> </strong>and <a href="https://www.nics.uma.esis/"><strong>NICS</strong></a> jointly work on a nice project of a decentralized key management system, that offers cryptographically-enforced access control services. This system operates in a decentralized way and uses advanced cryptographic techniques developed by NICS, such as proxy re-encryption, threshold cryptography and zero-knowledge proofs, that securely embed access control functionality at the encryption level. The ultimate goal of this project is to create a basic infrastructure for the development of secure DApps (decentralized applications), which in turn will lead to numerous applications in many fields, such as fintech, identity management, and other.</li><li>Nuñez, D., Agudo, I. and Lopez, J., 2017. Proxy Re-Encryption: Analysis of constructions and its application to secure access delegation. <em>Journal of Network and Computer Applications</em>, <em>87</em>, pp.193–209.</li><li>Wang, Xu An, et al. “Identity Based Proxy Re-Encryption Scheme (IBPRE+) for Secure Cloud Data Sharing.” <em>Intelligent Networking and Collaborative Systems (INCoS), 2016 International Conference on</em>. IEEE, 2016.</li><li>Ibraimi, Luan, et al. “A type-and-identity-based proxy re-encryption scheme and its application in healthcare.” <em>Workshop on Secure Data Management</em>. Springer, Berlin, Heidelberg, 2008.</li><li>D. NUÑEZ, “UMBRAL: A THRESHOLD PROXY RE-ENCRYPTION SCHEME”, h<a href="https://github.com/nucypher/umbral-doc/blob/master/umbral-doc.pdf">ttps://github.com/nucypher/umbral-doc/blob/master/umbral-doc.pdf.</a></li><li><a href="https://crypto.stackexchange.com/questions/12357/advantages-of-bilinear-map">https://crypto.stackexchange.com/questions/12357/advantages-of-bilinear-map</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f8630c802ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Self Sovereign Identity]]></title>
            <link>https://alkopnin.medium.com/self-sovereign-identity-81f28d0772d2?source=rss-661951ac9ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/81f28d0772d2</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[sovrin]]></category>
            <category><![CDATA[anonymous-credential]]></category>
            <category><![CDATA[identity]]></category>
            <dc:creator><![CDATA[Alexander Kopnin]]></dc:creator>
            <pubDate>Mon, 05 Feb 2018 05:13:28 GMT</pubDate>
            <atom:updated>2019-10-19T13:24:47.589Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eBIxYEsXAzv9a2tH66kmXQ.jpeg" /></figure><h4>Anonymous Credentials</h4><p><em>cryptography level: </em><strong><em>intermediate</em></strong></p><p>Nowadays we stand on the edge of the digital revolution. Blockchain gives a new life for a P2P technology. There is nothing new here, just an excellent mixing of the existing robust technics, such as P2P, key-value storage, cryptography and others. Blockchain opens doors for completely new markets as well as transforms the well-established ones.</p><p>Self Sovereign Identity is the next area to be changed. The identity idea, problem and solution are very well covered by Sovrin in their <a href="https://sovrin.org/wp-content/uploads/Sovrin-Protocol-and-Token-White-Paper.pdf">WP</a>. In my posts I’m going to take you through the generalized mathematical schemes under the hood. Actually scientists have done a kind of cryptography researches and I’m going to summarize their works to demonstrate how it efficiently uses in the modern digital world.</p><p>Innovative Identity systems should satisfy 3 basic criteria: <strong>DPKI, Anonymous Credentials </strong>and<strong> Credentials Revocation.</strong></p><blockquote>DPKI:</blockquote><blockquote>The effectiveness and efficiency of any commercial interaction depends strongly on the level of trust that exists between the involved parties. Trust determines if parties are willing to depend on each other, even if negative consequences are possible, and without it, commercial transactions will be inefficient because of doubts about payments, ability to deliver a service, etc.</blockquote><blockquote>The goal of DPKI is to ensure that no single third-party can compromise the integrity and security of the system as a whole. Trust is decentralized through the use of technologies that make it possible for geographically and politically disparate entities to reach consensus on the state of a shared database. DPKI focuses primarily on decentralized key-value datastores, called <em>blockchains</em>, but it is perfectly capable of supporting other technologies that provide similar or superior security properties.</blockquote><p>I would recommend you to start reading about DPKI from <a href="https://www.ibm.com/blogs/blockchain/2018/06/self-sovereign-identity-why-blockchain/">here</a>. There you can find the methods engaged to address PKI problems. Web-Of-Trust propagated great <a href="http://www.weboftrust.info/downloads/dpki.pdf">specification</a> as Blockchain scales and evolves DPKI ideas.</p><blockquote>Credentials Revocation:</blockquote><blockquote>Authentication of users is vital to most of the electronic systems we use today. It is usually achieved by giving the user a token, or credential, that the user must present to prove that she has permission to access a service. An important challenge that such systems face is how to revoke<em> </em>a user’s privileges in case she/he misbehaves or their credential gets compromised.</blockquote><p>The revocation methods are important for any identity system. The platform has to ensure that user or authority may be revoked at any time. If it happened, other participants should be notified immediately and revoked subject’s attributes will not be acceptable anymore.</p><h4>Anonymous Credentials</h4><blockquote>Anonymous Credential systems allow users to selectively prove statements about their identity attributes while keeping the corresponding data hidden.</blockquote><p>Anonymous credentials is a technique that guarantees that user’s private information is never revealed. The user proofs that specific attributes fulfills Verifier’s requirements (age &gt; X, nationality, etc) without revealing any additional information about their identity. Next generation identity systems should satisfy the follow criteria: <em>the user has to be anonymous when obtaining credentials</em>, <em>the user has to be protected from identity theft</em> and <em>the user’s secret key SK should never be leaked to any other party</em>.</p><p>Traditionally, such systems are based on digital signature. Digital signature schemes are a fundamental cryptographic application. They give the electronic equivalent of the paper-based idea of having a document signed. A digital signature scheme consists of (1) a key generation algorithm that generates a <em>public key PK</em> and a <em>secret key SK</em>; (2) a signing algorithm that takes as inputs a message <em>m</em> and a <em>secret key SK</em> and generates a <em>signature σ</em>; and (3) a verification algorithm that tests whether some string <em>σ</em> is a signature on message <em>m</em> under the public key <em>PK</em>. Signature scheme exists if and only if one-way functions exist.</p><p>To satisfy criteria above, the protocol should operate on a committed message and the user should obtain signature on it.</p><h4>Camenisch &amp; Lysyanskaya Digital Signature</h4><p>Traditionally the digital signature operates on a fix length hash of the incoming message, thus we can get hash of messages and calculate the final result. One of its most interesting features is probably the ability of CL-signature to be randomized: given a valid CL-signature <em>σ = (a, b, c)</em> on a message <em>m</em>, anyone can generate <strong>another valid signature</strong> on the same message by selecting a random scalar <em>t</em> and computing:</p><p><em>σ’ =(pow(</em>a, t<em>), pow(</em>b, t<em>), pow(</em>c,t<em>)).</em></p><blockquote>Camenisch &amp; Lysyanskaya Digital Signature allows to prove knowledge of a signature and to obtain signature on a secret message based on proofs of knowledge. Thus, when a user wants to convince a verifier that she/he has obtained a credential from an issuer and selectively reveal some of the messages of the credential, she/he employs a zero-knowledge proof stating that she/he “knows” a signature by the issuing organization and messages that the signature is valid.</blockquote><p>Another efficiency of CL-signatures is that it can be used to sign <em>r</em>-message vectors (m-<em>1</em>, …, m-<em>r</em>) at once. The subject’s attributes (age, social number, etc.) can be represented as a single vector to sign.</p><p>CL-signature has the same simple three steps — <em>Generation, Sign, and Verify</em> — with one minor change, they need to know the number of messages that will be handled.</p><p>&gt; <strong>Key generation</strong> (group details are <em>consciously </em>omitted).<strong><br></strong>CL has RSA nature and uses Key based on safe prime numbers p and q. Camenisch &amp; Lysyanskaya signature encrypts arbitrary number of attributes and provides efficient scheme to verify them partly.</p><p>For user who encrypts <strong>L</strong> attributes, the signature looks as follow:<br><strong>IN</strong> — <em>RSA Module: </em><a href="https://en.wikipedia.org/wiki/RSA_(cryptosystem)">n</a>, n=pq<br><strong>IN</strong> — <em>Randoms: Z</em>, S, R0, …, R(L-1)<br><strong>OUT</strong> <em>— Public key</em>: (n, R0, …, R(L-1), Z, S)<br><strong>OUT</strong> — <em>Secret Key:</em> (p)</p><p>&gt; <strong>Signing.<br></strong>To compare with RSA signature there are multiple values encrypted here. The signature use special random S to blind the data for signature issuer.</p><p><strong>IN</strong><em> — User’s L attributes</em>: (m1, …, mL)<br><strong>OUT</strong> — <em>Random Prime</em>: e<br><strong>OUT</strong> — <em>Random number</em>: v</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O0_H_lvEpDqzXkiYeBC8Qg.png" /></figure><p>The signature consists of <strong>(e, A, v). </strong>However, if <em>A </em>public it destroys privacy doing linkable transactions. To prevent security leak, the derived signature <strong>(e, A’, v’) </strong>can be generated for each transaction accordingly to randomizable properties .</p><p>&gt; <strong>Verification.<br>IN</strong><em> — User’s L attributes</em>: (m1, …, mL)<br><strong>IN</strong> — <em>Public Key</em>: (n, R0, …, R(L-1), S, Z)<br><strong>IN</strong> — <em>Signature</em>: (e, A, v)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PZDzNxDF9sHCCtX0FohCpA.png" /></figure><h4>Anonymous Credentials</h4><p>Obviously to verify the signature the Verifier should obtain the user’s attributes. To hide real attribute and implement full model, 2 more steps should be introduced: <strong>committed scheme</strong> &amp; <strong>ZKP.</strong></p><p>Committed scheme is a basic cryptography method to hide information until sometime in the future. Details can be found <a href="https://www.linkedin.com/feed/update/urn:li:activity:6356248447598764032">here</a>.</p><p><strong>&gt; Pedersen</strong> <strong>commitment<br></strong>Commitment is just a special message from the sender to the receiver. De-commitment is a group of values to verify validity of commitment. Let’s take a look an exampe:</p><p><strong>IN</strong> — <em>Message</em>: m <br><strong>IN</strong> — <em>RSA module</em>: n, n=pq<br><strong>IN</strong> — <em>Random number</em>: g, h<br><strong>IN</strong> — <em>Random number</em>: r<strong><br>OUT</strong> — <em>Public Key</em>: (n, g, h)<br><strong>OUT</strong> — <em>Commitment</em>: com = (g^m) * (h^r)<br><strong>OUT</strong> — <em>De-commitment</em>: (m, r)</p><p>To check the committed value the Verifier calculates:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HYUE47HNhqFAPc-GGR06XQ.png" /></figure><p>&gt; <strong>Zero-knowledger proof <br></strong>The idea of ZKP is that the <em>Prover</em> convinces the <em>Verifier</em> about the secret without revealing it. Protocol consists of an interaction session with the follow properties:</p><ol><li>zero-knowledge<br><em>the verifier learns nothing about the prover&#39;s secret</em></li><li>proof of knowledge (soundness)<br><em>the prover can persuade the verifier only if she/he knows the secret</em></li><li>completeness<br><em>if the prover knows the secret she/he can always convince the verifier</em></li></ol><p>One of the simplest tp demonstrate is the proof of knowledge of a discrete logarithm. In order to prove knowledge of:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*asUHJ3dRn5sF0mpCAGlx1A.png" /></figure><p>the prover interacts with the verifier as follows:</p><ol><li><strong>The Prover</strong> commits himself to randomness <strong><em>r</em></strong><em>:</em> <em>com</em>=g^r.</li><li><strong>The Verifier</strong> replies with a <em>challenge</em> <strong>c </strong>chosen at random: <em>c</em></li><li><strong>The Prover</strong> sends the third and last message (the <em>response</em>): <em>s</em> = r+cx</li><li><strong>The Verifier</strong> accepts, if g^s =com * (y^c), where y = g^x</li></ol><p>&gt; <strong>Putting Things Together<br></strong>To address criteria for anonymous credetential the cryptgraphic techniques should be mixed together.</p><p>There are 3 entities: <em>Verifier, Signer, Prover</em>.</p><ul><li><strong>The Issuer</strong> signs the Prover’s attributes with Camenisch &amp; Lysyanskay signature: <em>(e, A, v)</em>.</li><li><strong>The Verifier</strong> asks if the Prover meets specific request: “age above then X years” or nationality “either US or FR or ..” etc.</li><li><strong>The Prover</strong> derives signature, generated ZKP of having signature over attributes from particular issuer and ZKP to reply on the incoming request.</li></ul><blockquote>Anonymous credentials provides :<br>- Knowledge of the signature over the set of attributes<br>- Knowledge of attributes without revealing their respective values<br>- An attribute’s value lies within a numeric range <br>- An attribute’s value is not equal to another value<br>- An attribute’s value is or is not a member of a set</blockquote><p>Have fun and enjoy cryptography.</p><ol><li>J. Camenisch and A. Lysyanskaya, “A signature scheme with efficient protocols,” in <em>SCN</em>, ser. Lecture Notes in Computer Science, vol. 2576. Springer, 2002, pp. 268–289.</li><li>Camenisch, J. and Groß, T., 2008, October. Efficient attributes for anonymous credentials. In <em>Proceedings of the 15th ACM conference on Computer and communications security</em> (pp. 345–356). ACM.</li><li>“Specification of the identity mixer cryptographic library version 2.3.0,” 2009, <a href="http://domino.research.ibm.com/library/cyberdig.nsf/">http://domino.research.ibm.com/library/cyberdig.nsf/</a> papers/EEB54FF3B91C1D648525759B004FBBB1/$File/rz3730 revised.pdf.</li><li>D. Khovratovich, “Anonymous credential,” 2016, <a href="https://github.com/hyperledger/indy-anoncreds/blob/master/docs/anoncred-usecase0.pdf">https://github.com/hyperledger/indy-anoncreds/blob/master/docs/anoncred-usecase0.pdf</a>.</li><li>D. Khovratovich and J. Law, “Sovrin: digital identities in the blockchain era,” <a href="https://sovrin.org/wp-content/uploads/AnonCred-RWC.pdf">https://sovrin.org/wp-content/uploads/AnonCred-RWC.pdf</a>.</li><li>F. Boudot. Efficient proofs that a committed number lies in an interval. In B. Pre- neel, editor, Advances in Cryptology — EUROCRYPT 2000, volume 1807 of Lec- ture Notes in Computer Science, pages 431–444. Springer Verlag, 2000.</li><li>Camenisch J, Lysyanskaya A. Signature schemes and anonymous credentials from bilinear maps. InAnnual International Cryptology Conference 2004 Aug 15 (pp. 56–72). Springer, Berlin, Heidelberg.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81f28d0772d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>