1 Reply Latest reply on Oct 20, 2011 12:08 AM by Michael Thornburgh

    ID help for basic rtmfp video stream app

    canatividad

      In the article:

      http://www.adobe.com/devnet/flashplayer/articles/rtmfp_cirrus_app.html

       

      I need help understanding the following section:

       

      "Now, create the receiving NetStream:

      private var recvStream:NetStream;

       

      recvStream = new NetStream(netConnection, id_of_publishing_client);

      recvStream.addEventListener(NetStatusEvent.NET_STATUS, netStreamHandler);

      recvStream.play("media");

      At this point, you hear audio and you can create a Video object to display video. In order to create the receiving NetStream, you must know the 256-bit peer ID of the publisher (id_of_publishing_client). In order to receive audio/video, you must know the name of the stream being published."

      ***

      I do not understand what "id_of_publishing client" is supposed to be?

      Where do I get it from or how do I produce it? Can this be string that user can enter in a text field on the flash object and when two strings match it produces a connection between the two?

      Is there a hash system I have to pass the string through to generate a 256bit peer id from a string thats input or do i use the one given to me through adobe labs?

      Is there any relation to creating a Netgroup?

      I have the dev_key and cirrus address to access  the cirrus service provided by adobe, Im just stuck on the ID part that I cant fully understand from the article, do require a database to store and manage the IDs in a simple app?

      Im trying to develop a very basic program that uses the rtmfp examples provided in the article but Im stuck here, I would appreciate anyones help in the matter. Additionally I have looked at the cirrus phone example that uses the cgi file to manage IDs but I find it to be even more troublesome to work with therefore I have resorted to making a extremely basic example that avoid creating an ID database or use my own FMS.

      Thank you in advance for your help.

        • 1. Re: ID help for basic rtmfp video stream app
          Michael Thornburgh Adobe Employee

          the "id_of_publishing_client" is the peer ID of the publisher.  a peer ID is a unique cryptographic identifier that every RTMFP instance has. it's the NetConnection.nearID of an RTMFP NetConnection object. the idea is you use some method (such as a web service database or copy-and-paste between two windows on your development computer) to transfer the peer ID of a publisher (a peer with a NetStream in DIRECT_CONNECTIONS mode) to a subscriber for use in its NetStream constructor.

           

          a Flash Player's NetConnection peer ID is the SHA256 hash of the RTMFP certificate, which contains (among other things) a Diffie-Hellman public key.  the Diffie-Hellman public/private key pair is made fresh each time you make a new RTMFP NetConnection from your computer's cryptographic pseudorandom number source (example: /dev/urandom on Mac/Unix/Linux computers), and those keys are used (with other data) to establish the symmetric encryption & decryption keys for AES, which is used to encrypt all communication between RTMFP peers.  a client's peer ID is unforgeable* because you must have the private key that goes with the public key in order to generate the same AES keys that your peer is using. without the private key, the communication just won't work. *performing the discrete logarithm of a 1024-bit DH public key to get the private key or finding a collision in SHA256 are both "hard enough" to claim that peer IDs are unforgeable.