Additions:
There are graphical tools like [[FreenetJsite jSite]] to help you easily add freesites to Freenet, but for pedagogical purposes we will use the [[FreenetConsole telnet interface]] to show how the process of adding an SSK freesite works step by step.
Deletions:
Revision [3584]
Edited on 2009-12-04 10:02:25 by RichardHaguisan [add link SHA-256 to wikipedia site..]Additions:
There are graphical tools like [[FreenetJsite jSite]] to help you easily add freesites to Freenet, but for pedagogical purposes we will use the [[FreenetConsole telnet interface]] to [[http://www.cheappoolproducts.com pool supplies]]show how the process of adding an SSK freesite works step by step.
Deletions:
Revision [2315]
Edited on 2007-11-19 15:35:10 by MatthewToseland [move algorithms to a separate part at the end, explain the extra bytes]Additions:
It works by using **public-key cryptography** so you automatically sign your site. Only the person with the secret key can add updated versions of your site to Freenet.
~**""GB3wuHmtxN2wLc7g4y1ZVydkK6sOT-DuOsUo-eHK35w""** is the hash of the public key. This part is all that is required to uniquely identify the file (but not decrypt it), so nodes need only store this bit. The actual public key is stored (unencrypted) with the (encrypted) data.
~**""c63EzO7uBEN0piUbHPkMcJYW7i7cOvG42CM3YDduXDs""** is the document decryption key. This is only known to clients and not to the nodes storing the data, so nodes cannot decrypt the data they store without the full address.
====The gory details: Algorithms====
The symmetric encryption key is 256-bit [[http://en.wikipedia.org/wiki/Advanced_Encryption_Standard Rijndael]] (both key and block size; not strictly AES as AES specifies a 128-bit block size) with [[http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation CFB mode]] (referred to as PCFB in some of the source code for historical reasons).
Hashes are all [[http://en.wikipedia.org/wiki/SHA_hash_functions SHA-256]].
The public key encryption is 2048-bit [[http://en.wikipedia.org/wiki/Digital_Signature_Algorithm DSA]] with a 256-bit M (an extension of FIPS-180-2, close to FIPS-180-3).
All the non-human-readable parts of the SSK are [[http://en.wikipedia.org/wiki/Base64 base64]] encoded bytes - a pubkey hash (or a privkey for an insert url), a symmetric key, and the extra bytes specifying crypto settings.
The last part of the SSK, aka the extra bytes, "AQABAAE" or similar, indicates which algorithms have been used for the SSK (1, first byte), whether it is a private key (1) or a public key (0) (second byte), the encryption algorithm (2, third byte), and the hash algorithm (1, fourth and fifth bytes).
~**""GB3wuHmtxN2wLc7g4y1ZVydkK6sOT-DuOsUo-eHK35w""** is the hash of the public key. This part is all that is required to uniquely identify the file (but not decrypt it), so nodes need only store this bit. The actual public key is stored (unencrypted) with the (encrypted) data.
~**""c63EzO7uBEN0piUbHPkMcJYW7i7cOvG42CM3YDduXDs""** is the document decryption key. This is only known to clients and not to the nodes storing the data, so nodes cannot decrypt the data they store without the full address.
====The gory details: Algorithms====
The symmetric encryption key is 256-bit [[http://en.wikipedia.org/wiki/Advanced_Encryption_Standard Rijndael]] (both key and block size; not strictly AES as AES specifies a 128-bit block size) with [[http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation CFB mode]] (referred to as PCFB in some of the source code for historical reasons).
Hashes are all [[http://en.wikipedia.org/wiki/SHA_hash_functions SHA-256]].
The public key encryption is 2048-bit [[http://en.wikipedia.org/wiki/Digital_Signature_Algorithm DSA]] with a 256-bit M (an extension of FIPS-180-2, close to FIPS-180-3).
All the non-human-readable parts of the SSK are [[http://en.wikipedia.org/wiki/Base64 base64]] encoded bytes - a pubkey hash (or a privkey for an insert url), a symmetric key, and the extra bytes specifying crypto settings.
The last part of the SSK, aka the extra bytes, "AQABAAE" or similar, indicates which algorithms have been used for the SSK (1, first byte), whether it is a private key (1) or a public key (0) (second byte), the encryption algorithm (2, third byte), and the hash algorithm (1, fourth and fifth bytes).
Deletions:
~**""GB3wuHmtxN2wLc7g4y1ZVydkK6sOT-DuOsUo-eHK35w""** is the (SHA256) hash of the public key. This part is all that is required to uniquely identify the file (but not decrypt it), so nodes need only store this bit. The actual public key is stored (unencrypted) with the (encrypted) data.
~**""c63EzO7uBEN0piUbHPkMcJYW7i7cOvG42CM3YDduXDs""** is the (AES256) document decryption key. This is only known to clients and not to the nodes storing the data, so nodes cannot decrypt the data they store without the full address.
====TODO====
~1) Explain what cipher/mode/size is used for the public/private keypair
~1) Explain what cipher/mode/size is used for the symmetric key
~1) Explain the breakdown of the small 'tail' part of public SSK URIs, eg the ',AQABAAE' part of the above example
~1) Explain which hash/mode is used for the H(pubkey) part of SSK public URIs. (Is it SHA(256)? SHA(1)?)
Additions:
It works by using **public-key cryptography** so you automatically sign your site (using 2048-bit DSA). Only the person with the secret key can add updated versions of your site to Freenet.
Deletions:
Additions:
~**""GB3wuHmtxN2wLc7g4y1ZVydkK6sOT-DuOsUo-eHK35w""** is the (SHA256) hash of the public key. This part is all that is required to uniquely identify the file (but not decrypt it), so nodes need only store this bit. The actual public key is stored (unencrypted) with the (encrypted) data.
~**""c63EzO7uBEN0piUbHPkMcJYW7i7cOvG42CM3YDduXDs""** is the (AES256) document decryption key. This is only known to clients and not to the nodes storing the data, so nodes cannot decrypt the data they store without the full address.
~**""c63EzO7uBEN0piUbHPkMcJYW7i7cOvG42CM3YDduXDs""** is the (AES256) document decryption key. This is only known to clients and not to the nodes storing the data, so nodes cannot decrypt the data they store without the full address.
Deletions:
~**""c63EzO7uBEN0piUbHPkMcJYW7i7cOvG42CM3YDduXDs""** is the document decryption key. This is only known to clients and not to the nodes storing the data, so nodes cannot decrypt the data they store without the full address.
Revision [1536]
Edited on 2006-11-28 10:52:00 by MosTeo [Corrected mismatch between example key and textual explanation (foobar/mysite)]Additions:
~**""http://localhost:8888/SSK@CxRxWs...BAAE/mysite-4/""**
Deletions:
Revision [1056]
Edited on 2006-06-05 20:06:04 by DavidMcNabAdditions:
~1) Explain which hash/mode is used for the H(pubkey) part of SSK public URIs. (Is it SHA(256)? SHA(1)?)
Revision [1055]
Edited on 2006-06-05 19:57:23 by DavidMcNabAdditions:
====TODO====
~1) Explain what cipher/mode/size is used for the public/private keypair
~1) Explain what cipher/mode/size is used for the symmetric key
~1) Explain the breakdown of the small 'tail' part of public SSK URIs, eg the ',AQABAAE' part of the above example
~1) Explain what cipher/mode/size is used for the public/private keypair
~1) Explain what cipher/mode/size is used for the symmetric key
~1) Explain the breakdown of the small 'tail' part of public SSK URIs, eg the ',AQABAAE' part of the above example
Revision [840]
Edited on 2006-04-21 17:44:20 by JaQaAdditions:
The random-looking text in the middle is a pointer to the public key, and also a symmetric key used for privacy. The **mysite** part is a word chosen by the site creator, and the **4** is the version of the site. The version number is incremented each time you create a new version of the site and insert it into Freenet. We use this approach because it is not currently possible to update data in Freenet, nor is this likely in the near or medium term. [[FreenetUSKpages Updatable Subspace Keys]] make this even more transparent to the end user.
~1) The SSK is made up of a **hash** of the **public key**, and the **symmetric key**. The hash of the public key acts as the index to the data for searching purposes. Also, the actual public key is stored with the data. This is so that Freenet nodes can verify the signature when the SSK file comes into their node, and also so that clients can verify the signature when retrieving the file. The symmetric key is so that clients can decrypt the file.
~1) The SSK is made up of a **hash** of the **public key**, and the **symmetric key**. The hash of the public key acts as the index to the data for searching purposes. Also, the actual public key is stored with the data. This is so that Freenet nodes can verify the signature when the SSK file comes into their node, and also so that clients can verify the signature when retrieving the file. The symmetric key is so that clients can decrypt the file.
Deletions:
~1) The SSK is made up of a **hash** of the **public key**, and the **symmetric key**. The hash of the public key is like the index to the data, but the actual public key is stored with the data. This is so that Freenet nodes can verify the signature when the SSK file comes into their node, and also so that clients can verify the signature when retrieving the file. The symmetric key is so that clients can decrypt the file.
Revision [839]
Edited on 2006-04-21 17:42:06 by JaQaAdditions:
~**""GB3wuHmtxN2wLc7g4y1ZVydkK6sOT-DuOsUo-eHK35w""** is the hash of the public key. This part is all that is required to uniquely identify the file (but not decrypt it), so nodes need only store this bit. The actual public key is stored (unencrypted) with the (encrypted) data.
~1) The SSK is made up of a **hash** of the **public key**, and the **symmetric key**. The hash of the public key is like the index to the data, but the actual public key is stored with the data. This is so that Freenet nodes can verify the signature when the SSK file comes into their node, and also so that clients can verify the signature when retrieving the file. The symmetric key is so that clients can decrypt the file.
~1) The SSK is made up of a **hash** of the **public key**, and the **symmetric key**. The hash of the public key is like the index to the data, but the actual public key is stored with the data. This is so that Freenet nodes can verify the signature when the SSK file comes into their node, and also so that clients can verify the signature when retrieving the file. The symmetric key is so that clients can decrypt the file.
Deletions:
~1) The SSK is made up of the **public key** and the **symmetric key**. The public key is so that Freenet nodes can verify the signature when the SSK file comes into their node, and also so that clients can verify the signature when retrieving the file. The symmetric key is so that clients can decrypt the file.
Revision [837]
Edited on 2006-04-21 16:06:05 by JaQaAdditions:
~**""GB3wuHmtxN2wLc7g4y1ZVydkK6sOT-DuOsUo-eHK35w""** is the hash of the public key. This part is all that is required to uniquely identify the file (but not decrypt it), so nodes need only store this bit.
~**""c63EzO7uBEN0piUbHPkMcJYW7i7cOvG42CM3YDduXDs""** is the document decryption key. This is only known to clients and not to the nodes storing the data, so nodes cannot decrypt the data they store without the full address.
~**""AQABAAE""** is the encryption settings etc.
~1) When a file is inserted into Freenet, it is encrypted with the **symmetric key** and signed with the **private key**. The signature is stored with the file. Nodes don't store the **symmetric key**, only the **public key** part of the SSK, as an index to the data. This is so they can [[FreenetPlausibleDeniability plausibly deny]] knowledge of the data on their node.
~**""c63EzO7uBEN0piUbHPkMcJYW7i7cOvG42CM3YDduXDs""** is the document decryption key. This is only known to clients and not to the nodes storing the data, so nodes cannot decrypt the data they store without the full address.
~**""AQABAAE""** is the encryption settings etc.
~1) When a file is inserted into Freenet, it is encrypted with the **symmetric key** and signed with the **private key**. The signature is stored with the file. Nodes don't store the **symmetric key**, only the **public key** part of the SSK, as an index to the data. This is so they can [[FreenetPlausibleDeniability plausibly deny]] knowledge of the data on their node.
Deletions:
"c63EzO7uBEN0piUbHPkMcJYW7i7cOvG42CM3YDduXDs" is the document decryption key (this is only known to clients and not to the nodes storing the data)
"AQABAAE" is the encryption settings etc.
~1) When a file is inserted into Freenet, it is encrypted with the **symmetric key** and signed with the **private key**. The signature is stored with the file.
Revision [791]
Edited on 2006-04-13 00:28:12 by IanClarkeAdditions:
The random-looking text in the middle is a pointer to the public key, and also a symmetric key used for privacy. The **mysite** part is a word chosen by the site creator, and the *4* is the version of the site. The version number is incremented each time you create a new version of the site and insert it into Freenet. We use this approach because it is not currently possible to update data in Freenet, nor is this likely in the near or medium term. [[FreenetUSKpages Updatable Subspace Keys]] make this even more transparent to the end user.
Signed Subspace Key sites have largely been superseded by [[FreenetUSKpages Updatable Subspace Key]] (USK) sites, which are based on SSKs but allow for links that try to always retrieve the most up-to-date version of the site.
Signed Subspace Key sites have largely been superseded by [[FreenetUSKpages Updatable Subspace Key]] (USK) sites, which are based on SSKs but allow for links that try to always retrieve the most up-to-date version of the site.
Deletions:
Signed Subspace Key sites have largely been superseded by [[FreenetUSKpages Updateable Subspace Key]] (USK) sites, which are based on SSKs but allow for links that try to always retrieve the most up-to-date version of the site.
Revision [788]
Edited on 2006-04-12 19:02:53 by MatthewToselandAdditions:
The random-looking text in the middle is a pointer to the public key, and also a symmetric key used for privacy. The **mysite** part is a word chosen by the site creator, and the *4* is the version of the site. The version number is incremented each time you create a new version of the site and insert it into Freenet.
"GB3wuHmtxN2wLc7g4y1ZVydkK6sOT-DuOsUo-eHK35w" is the hash of the public key.
"c63EzO7uBEN0piUbHPkMcJYW7i7cOvG42CM3YDduXDs" is the document decryption key (this is only known to clients and not to the nodes storing the data)
"AQABAAE" is the encryption settings etc.
Signed Subspace Key sites have largely been superseded by [[FreenetUSKpages Updateable Subspace Key]] (USK) sites, which are based on SSKs but allow for links that try to always retrieve the most up-to-date version of the site.
"GB3wuHmtxN2wLc7g4y1ZVydkK6sOT-DuOsUo-eHK35w" is the hash of the public key.
"c63EzO7uBEN0piUbHPkMcJYW7i7cOvG42CM3YDduXDs" is the document decryption key (this is only known to clients and not to the nodes storing the data)
"AQABAAE" is the encryption settings etc.
Signed Subspace Key sites have largely been superseded by [[FreenetUSKpages Updateable Subspace Key]] (USK) sites, which are based on SSKs but allow for links that try to always retrieve the most up-to-date version of the site.
Deletions:
Signed Subspace Key sites have largely been superseded by [[FreenetUSKpages Updateable Subspace Key]] (USK) sites, which are similar but allow for links that try to always retrieve the most up-to-date version of the site.
Revision [787]
Edited on 2006-04-12 18:59:32 by MatthewToselandAdditions:
~**""http://localhost:8888/SSK@CxRxWs...BAAE/foobar-4/""**
Deletions:
Revision [786]
Edited on 2006-04-12 18:59:01 by MatthewToselandAdditions:
**Signed Subspace Keys** are usually for sites that are going to change over time. For example, a website that may need news to be updated or information to be corrected, added or deleted. They work in such a way that someone else can't put up a newer version of your site and pretend it was you who did it.
Deletions:
Revision [780]
Edited on 2006-04-11 21:04:48 by JaQaAdditions:
~1) The SSK is made up of the **public key** and the **symmetric key**. The public key is so that Freenet nodes can verify the signature when the SSK file comes into their node, and also so that clients can verify the signature when retrieving the file. The symmetric key is so that clients can decrypt the file.
Deletions:
Revision [779]
Edited on 2006-04-11 21:03:24 by JaQaAdditions:
~1) The author generates a cryptographic keypair: a **private key** for signing files and a **public key** for verifying the signature.
~1) The author also generates a single **symmetric key** (one that is used for both encrypting and decrypting).
~1) When a file is inserted into Freenet, it is encrypted with the **symmetric key** and signed with the **private key**. The signature is stored with the file.
~1) The SSK is made up of the **public key** and the **symmetric key**. The public key is so that Freenet nodes can verify the signature when the SSK file comes into their node. The symmetric key is so that clients can decrypt the file.
~1) The author also generates a single **symmetric key** (one that is used for both encrypting and decrypting).
~1) When a file is inserted into Freenet, it is encrypted with the **symmetric key** and signed with the **private key**. The signature is stored with the file.
~1) The SSK is made up of the **public key** and the **symmetric key**. The public key is so that Freenet nodes can verify the signature when the SSK file comes into their node. The symmetric key is so that clients can decrypt the file.
Deletions:
~1) The author also generates a single symmetric key (one that is used for both encrypting and decrypting).
~1) When a file is inserted into Freenet, it is encrypted with the symmetric key and signed with the private key. The signature is stored with the file.
~1) The SSK is made up of the public key and the symmetric key. The public key is so that Freenet nodes can verify the signature when the SSK file comes into their node. The symmetric key is so that clients can decrypt the file.
Revision [778]
Edited on 2006-04-11 21:02:19 by JaQaAdditions:
~1) The author generates a cryptographic keypair: a private key for signing files and a public key for verifying the signature.
~1) When a file is inserted into Freenet, it is encrypted with the symmetric key and signed with the private key. The signature is stored with the file.
~1) The SSK is made up of the public key and the symmetric key. The public key is so that Freenet nodes can verify the signature when the SSK file comes into their node. The symmetric key is so that clients can decrypt the file.
~1) When a file is inserted into Freenet, it is encrypted with the symmetric key and signed with the private key. The signature is stored with the file.
~1) The SSK is made up of the public key and the symmetric key. The public key is so that Freenet nodes can verify the signature when the SSK file comes into their node. The symmetric key is so that clients can decrypt the file.
Deletions:
~1)
Revision [777]
Edited on 2006-04-11 20:38:14 by JaQaAdditions:
====How SSKs work====
~1) The author generates a cryptographic keypair: a private key for signing and a public key for verifying the signature.
~1) The author also generates a single symmetric key (one that is used for both encrypting and decrypting).
~1)
~1) The author generates a cryptographic keypair: a private key for signing and a public key for verifying the signature.
~1) The author also generates a single symmetric key (one that is used for both encrypting and decrypting).
~1)