<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.cedricbonhomme.org/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>cedric's bazaar - security</title>
        <description></description>
        <link>https://wiki.cedricbonhomme.org/</link>
        <lastBuildDate>Mon, 11 May 2026 19:46:01 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://wiki.cedricbonhomme.org/_media/wiki:dokuwiki.svg</url>
            <title>cedric's bazaar</title>
            <link>https://wiki.cedricbonhomme.org/</link>
        </image>
        <item>
            <title>authentication</title>
            <link>https://wiki.cedricbonhomme.org/security:authentication?rev=1467785779&amp;do=diff</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;management_of_password&quot;&gt;Management of password&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://pwsafe.org&quot; class=&quot;urlextern&quot; title=&quot;https://pwsafe.org&quot; rel=&quot;ugc nofollow&quot;&gt; Password Safe&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://www.passwordstore.org&quot; class=&quot;urlextern&quot; title=&quot;https://www.passwordstore.org&quot; rel=&quot;ugc nofollow&quot;&gt; pass&lt;/a&gt; (my choice).&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Do not store passwords in the browser or on Internet.
&lt;/p&gt;

&lt;p&gt;
&lt;code&gt;pass&lt;/code&gt; can also generate passwords (with &lt;code&gt;pwgen&lt;/code&gt;). Do not hesitate to generate strong passwords for each services you are using, since you won&amp;#039;t need to remember them.
&lt;/p&gt;

&lt;p&gt;
With &lt;code&gt;pass&lt;/code&gt; the passwords store can be a git repository, consequently it is possible synchronizes your passwords between different computers.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Management of password&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;management_of_password&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;2-514&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit2&quot; id=&quot;two_factor_authentication_2fa&quot;&gt;Two Factor Authentication (2FA)&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
Different methods:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; One Time Password (OTP): by SMS, with Google Authenticator or backup codes;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; specific application on your smarthpone or watch;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; YubiKey (my choice).&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
With the YubiKey you will be able to:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; use the 2FA with services such as Google, GitLab, GitHub, Bitbucket, Dropbox;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; generate One Time Password;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; unlock your smartphone;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; upload your GPG private key on it and then for example to protect your passwords store (&lt;code&gt;pass&lt;/code&gt; uses &lt;a href=&quot;https://git.zx2c4.com/password-store/about&quot; class=&quot;urlextern&quot; title=&quot;https://git.zx2c4.com/password-store/about&quot; rel=&quot;ugc nofollow&quot;&gt; GPG for the encryption&lt;/a&gt;).&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Two Factor Authentication (2FA)&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;two_factor_authentication_2fa&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;515-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 06 Jul 2016 06:16:19 +0000</pubDate>
        </item>
        <item>
            <title>cryptography</title>
            <link>https://wiki.cedricbonhomme.org/security:cryptography?rev=1362403121&amp;do=diff</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;asymmetric-key_cryptosystems&quot;&gt;Asymmetric-key cryptosystems&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Asymmetric-key cryptosystems&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;asymmetric-key_cryptosystems&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-45&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;primality_tests&quot;&gt;Primality tests&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Primality tests&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;primality_tests&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;46-74&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit3&quot; id=&quot;fermat_primality_test&quot;&gt;Fermat primality test&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Fermat primality test&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;fermat_primality_test&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;75-107&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit4&quot; id=&quot;miller-rabin_primality_test&quot;&gt;Miller-Rabin primality test&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Miller-Rabin primality test&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;miller-rabin_primality_test&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;108-146&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit5&quot; id=&quot;jacobi_primality_test&quot;&gt;Jacobi primality test&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Jacobi primality test&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;jacobi_primality_test&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;147-179&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit6&quot; id=&quot;symmetric-key_cryptosystems&quot;&gt;Symmetric-key cryptosystems&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;https://wiki.cedricbonhomme.org/tag:security?do=showtag&amp;amp;tag=security&quot; class=&quot;wikilink1&quot; title=&quot;tag:security&quot; rel=&quot;tag&quot;&gt;security&lt;/a&gt;,
	&lt;a href=&quot;https://wiki.cedricbonhomme.org/tag:cryptography?do=showtag&amp;amp;tag=cryptography&quot; class=&quot;wikilink1&quot; title=&quot;tag:cryptography&quot; rel=&quot;tag&quot;&gt;cryptography&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Symmetric-key cryptosystems&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;symmetric-key_cryptosystems&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;180-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 04 Mar 2013 13:18:41 +0000</pubDate>
        </item>
        <item>
            <title>privacy</title>
            <link>https://wiki.cedricbonhomme.org/security:privacy?rev=1511560369&amp;do=diff</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;web&quot;&gt;Web&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Web&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;web&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-18&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;browser&quot;&gt;Browser&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Your browser is the first exposed.
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; use &lt;a href=&quot;https://www.mozilla.org/firefox&quot; class=&quot;urlextern&quot; title=&quot;https://www.mozilla.org/firefox&quot; rel=&quot;ugc nofollow&quot;&gt; Firefox&lt;/a&gt; or &lt;a href=&quot;https://wiki.debian.org/Iceweasel&quot; class=&quot;urlextern&quot; title=&quot;https://wiki.debian.org/Iceweasel&quot; rel=&quot;ugc nofollow&quot;&gt; Iceweasel&lt;/a&gt; and check that it is always up to date (with the extensions and plugins);&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; add &lt;a href=&quot;https://duckduckgo.com/html&quot; class=&quot;urlextern&quot; title=&quot;https://duckduckgo.com/html&quot; rel=&quot;ugc nofollow&quot;&gt; DuckDuckGo HTML&lt;/a&gt; and/or &lt;a href=&quot;https://startpage.com/&quot; class=&quot;urlextern&quot; title=&quot;https://startpage.com/&quot; rel=&quot;ugc nofollow&quot;&gt; Startpage&lt;/a&gt; to your list of search engines;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; Extensions:&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://www.eff.org/https-everywhere&quot; class=&quot;urlextern&quot; title=&quot;https://www.eff.org/https-everywhere&quot; rel=&quot;ugc nofollow&quot;&gt;HTTPS Everywhere&lt;/a&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://www.eff.org/privacybadger&quot; class=&quot;urlextern&quot; title=&quot;https://www.eff.org/privacybadger&quot; rel=&quot;ugc nofollow&quot;&gt; Privacy Badger&lt;/a&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/ublock-origin&quot; class=&quot;urlextern&quot; title=&quot;https://addons.mozilla.org/en-US/firefox/addon/ublock-origin&quot; rel=&quot;ugc nofollow&quot;&gt; uBlock Origin&lt;/a&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/umatrix&quot; class=&quot;urlextern&quot; title=&quot;https://addons.mozilla.org/en-US/firefox/addon/umatrix&quot; rel=&quot;ugc nofollow&quot;&gt; uMatrix&lt;/a&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard&quot; class=&quot;urlextern&quot; title=&quot;https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard&quot; rel=&quot;ugc nofollow&quot;&gt; FoxyProxy&lt;/a&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://gist.github.com/cedricbonhomme/de05a2413273b8a3b7de&quot; class=&quot;urlextern&quot; title=&quot;https://gist.github.com/cedricbonhomme/de05a2413273b8a3b7de&quot; rel=&quot;ugc nofollow&quot;&gt; configurations&lt;/a&gt; in &lt;em&gt;about:config&lt;/em&gt; with the file &lt;code&gt;user.js&lt;/code&gt;:&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; Firefox preferences:&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; in the privacy tab precise that you do not want to be tracked by sites;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; do not accept cookies from sites and allow (for session only) sites you trust (&lt;a href=&quot;http://blog.cedricbonhomme.org/2013/08/04/nouvelle-attaque-sur-les-utilisateurs-de-tor&quot; class=&quot;urlextern&quot; title=&quot;http://blog.cedricbonhomme.org/2013/08/04/nouvelle-attaque-sur-les-utilisateurs-de-tor&quot; rel=&quot;ugc nofollow&quot;&gt; example&lt;/a&gt;);&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; install &lt;a href=&quot;https://www.torproject.org/&quot; class=&quot;urlextern&quot; title=&quot;https://www.torproject.org/&quot; rel=&quot;ugc nofollow&quot;&gt; Tor&lt;/a&gt;/Privoxy and use FoxyProxy to switch faster between Tor and the “no proxy” mode;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; do not use Tor without HTTPS on sensible sites;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; avoid using Google &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt; (even if they are fast and reliable). Prefer &lt;a href=&quot;https://www.fdn.fr/actions/dns/&quot; class=&quot;urlextern&quot; title=&quot;https://www.fdn.fr/actions/dns/&quot; rel=&quot;ugc nofollow&quot;&gt; French Data Network&lt;/a&gt; &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt; resolvers (80.67.169.12, 80.67.169.40).&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Another good solution is to use the &lt;a href=&quot;https://www.torproject.org/projects/torbrowser.html.en&quot; class=&quot;urlextern&quot; title=&quot;https://www.torproject.org/projects/torbrowser.html.en&quot; rel=&quot;ugc nofollow&quot;&gt; Tor Browser&lt;/a&gt; which is based on Firefox and pre-configured  with the best settings for your privacy and uses the Tor network by default. No technical knowledge is required.
&lt;/p&gt;

&lt;p&gt;
If you are using a public computer I recommend you &lt;a href=&quot;https://tails.boum.org/&quot; class=&quot;urlextern&quot; title=&quot;https://tails.boum.org/&quot; rel=&quot;ugc nofollow&quot;&gt; Tails&lt;/a&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Browser&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;browser&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;19-1926&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit3&quot; id=&quot;firefox_preferences&quot;&gt;Firefox preferences&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;/div&gt;

&lt;h4 id=&quot;user_preferences&quot;&gt;User preferences&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
&amp;lt;html&amp;gt;&amp;lt;script src=“&lt;a href=&quot;https://gist.github.com/cedricbonhomme/de05a2413273b8a3b7de.js&quot; class=&quot;urlextern&quot; title=&quot;https://gist.github.com/cedricbonhomme/de05a2413273b8a3b7de.js&quot; rel=&quot;ugc nofollow&quot;&gt;https://gist.github.com/cedricbonhomme/de05a2413273b8a3b7de.js&lt;/a&gt;”&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/html&amp;gt;
&lt;/p&gt;

&lt;/div&gt;

&lt;h4 id=&quot;privacy&quot;&gt;Privacy&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;https://wiki.cedricbonhomme.org/_detail/security:firefox_configuration.png?id=security%3Aprivacy&quot; class=&quot;media&quot; title=&quot;security:firefox_configuration.png&quot;&gt;&lt;img src=&quot;https://wiki.cedricbonhomme.org/_media/security:firefox_configuration.png&quot; class=&quot;mediacenter&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Firefox preferences&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;firefox_preferences&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;1927-2146&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;browsing_advices&quot;&gt;Browsing advices&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; check for the “lock” icon on the status bar (depends on the browser) that shows that you are on a secured web site. Also check that the &lt;abbr title=&quot;Uniform Resource Locator&quot;&gt;URL&lt;/abbr&gt; begins with “https” in the location bar when making transactions online;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; always check the &lt;abbr title=&quot;Uniform Resource Locator&quot;&gt;URL&lt;/abbr&gt; before clicking on a link;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; phishing:&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; use the navigation bar history to prevent malicious &lt;abbr title=&quot;Uniform Resource Locator&quot;&gt;URL&lt;/abbr&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; check that your browser is able to automatically fill in login forms with your information;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Browsing advices&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;browsing_advices&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;2147-2621&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit5&quot; id=&quot;social_networking&quot;&gt;Social networking&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; limit the usage of social networking services;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; check your public identity, for example by searching your name in Google (you can use Google Alerts or a script you wrote);&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; disable Google search history and Google location history;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; when possible, use two-factor authentication (possible with Google and Github for instance);&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; do not log into private services on public computers;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; do not hook all your online services together;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; do not share your phone&amp;#039;s location data;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; do not upload geotagged photos in the region your living (check the configuration of your smartphone and/or tablet);&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; do not allow people to tag your face;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; do not share your &lt;em&gt;Likes&lt;/em&gt;, &lt;em&gt;+1s&lt;/em&gt; or &lt;em&gt;whish lists&lt;/em&gt;. Prefer the use of bookmarks;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Social networking&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;social_networking&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;2622-3399&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit6&quot; id=&quot;email&quot;&gt;Email&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; ensure that after a &lt;a href=&quot;https://en.wikipedia.org/wiki/Post_Office_Protocol&quot; class=&quot;urlextern&quot; title=&quot;https://en.wikipedia.org/wiki/Post_Office_Protocol&quot; rel=&quot;ugc nofollow&quot;&gt; POP&lt;/a&gt; the fetched messages have been removed from the server;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; when possible uses &lt;a href=&quot;http://gnupg.org/&quot; class=&quot;urlextern&quot; title=&quot;http://gnupg.org/&quot; rel=&quot;ugc nofollow&quot;&gt; GnuPG&lt;/a&gt; to encrypt (and sign) your emails;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; consider the use of alternatives like &lt;a href=&quot;https://bitmessage.org/&quot; class=&quot;urlextern&quot; title=&quot;https://bitmessage.org/&quot; rel=&quot;ugc nofollow&quot;&gt; Bitmessage&lt;/a&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Email&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;email&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;3400-3735&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit7&quot; id=&quot;instant_messaging&quot;&gt;Instant messaging&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
Alternatives to well known spied systems:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; DukGo or another Jabber/XMPP service. Use &lt;a href=&quot;https://otr.cypherpunks.ca/&quot; class=&quot;urlextern&quot; title=&quot;https://otr.cypherpunks.ca/&quot; rel=&quot;ugc nofollow&quot;&gt; Off-the-Record&lt;/a&gt; (OTR), easy with Pidgin or Kopete;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; a worth watching project: &lt;a href=&quot;https://trac.torproject.org/projects/tor/wiki/org/meetings/2014WinterDevMeeting/notes/RoadmapTIMB&quot; class=&quot;urlextern&quot; title=&quot;https://trac.torproject.org/projects/tor/wiki/org/meetings/2014WinterDevMeeting/notes/RoadmapTIMB&quot; rel=&quot;ugc nofollow&quot;&gt; TIMB&lt;/a&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; another interesting project: &lt;a href=&quot;https://ricochet.im&quot; class=&quot;urlextern&quot; title=&quot;https://ricochet.im&quot; rel=&quot;ugc nofollow&quot;&gt; Ricochet&lt;/a&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;abbr title=&quot;Internet Relay Chat&quot;&gt;IRC&lt;/abbr&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Instant messaging&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;instant_messaging&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:7,&amp;quot;range&amp;quot;:&amp;quot;3736-4160&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit8&quot; id=&quot;system&quot;&gt;System&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://www.debian.org/&quot; class=&quot;urlextern&quot; title=&quot;https://www.debian.org/&quot; rel=&quot;ugc nofollow&quot;&gt; Debian&lt;/a&gt;:&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.kubuntu.org/&quot; class=&quot;urlextern&quot; title=&quot;http://www.kubuntu.org/&quot; rel=&quot;ugc nofollow&quot;&gt; Kubuntu&lt;/a&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.gnewsense.org/&quot; class=&quot;urlextern&quot; title=&quot;http://www.gnewsense.org/&quot; rel=&quot;ugc nofollow&quot;&gt; gNewSense&lt;/a&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://tails.boum.org/&quot; class=&quot;urlextern&quot; title=&quot;https://tails.boum.org/&quot; rel=&quot;ugc nofollow&quot;&gt; Tails&lt;/a&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Of course, this list is not exhaustive.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;System&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;system&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:8,&amp;quot;range&amp;quot;:&amp;quot;4161-4397&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit9&quot; id=&quot;etc_hosts&quot;&gt;/etc/hosts&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
The content of my &lt;code&gt;/etc/hosts&lt;/code&gt; file is based on &lt;a href=&quot;http://someonewhocares.org/hosts/&quot; class=&quot;urlextern&quot; title=&quot;http://someonewhocares.org/hosts/&quot; rel=&quot;ugc nofollow&quot;&gt; this very good example&lt;/a&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\/etc\/hosts&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;etc_hosts&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:9,&amp;quot;range&amp;quot;:&amp;quot;4398-4538&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit10&quot; id=&quot;dns&quot;&gt;DNS&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Choose the Domain Name Server you want to use.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;DNS&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;dns&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:10,&amp;quot;range&amp;quot;:&amp;quot;4539-4603&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit11&quot; id=&quot;solution_1&quot;&gt;Solution 1&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Probably the best solution. Lets you add your &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt; servers with a higher priority than the &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt; servers provided by the DHCP.
&lt;/p&gt;

&lt;p&gt;
&lt;em&gt;resolvconf&lt;/em&gt; is a set of scripts and hooks managing &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt; resolution.&lt;br/&gt;

The configuration of the internet connection is specified in the file &lt;code&gt;/etc/resolvconf&lt;/code&gt;. It is possible to edit this file, but any change manually done will be lost as it gets overwritten next time something triggers resolvconf.&lt;br/&gt;

A solution is to use the file &lt;code&gt;/etc/resolvconf/resolv.conf.d/head&lt;/code&gt; in order to ensure a &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt; server is always the first one in the list.
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;# apt-get install resolvconf&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# cat /etc/resolvconf/resolv.conf.d/head&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# French Data Network DNS resolvers&lt;/span&gt;
nameserver 80.67.169.12
nameserver 80.67.169.40
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# resolvconf -u&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Solution 1&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;solution_1&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:11,&amp;quot;range&amp;quot;:&amp;quot;4604-5538&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit12&quot; id=&quot;solution_2&quot;&gt;Solution 2&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
If your interface is configured statically then you can change your &lt;abbr title=&quot;Domain Name System&quot;&gt;DNS&lt;/abbr&gt; by this manner:
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co4&quot;&gt;# &lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;vim&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;etc&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;network&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;interfaces&lt;/pre&gt;

&lt;p&gt;
Add this section:
&lt;/p&gt;
&lt;pre class=&quot;code cfg&quot;&gt;iface eth0 inet static
address 192.168.1.11
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 80.67.169.12 80.67.169.40&lt;/pre&gt;

&lt;p&gt;
Restart the interface and check:
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;# ifdown eth0&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# ifup eth0&lt;/span&gt;
&lt;span class=&quot;co0&quot;&gt;# exit&lt;/span&gt;
$ nslookup cedricbonhomme.org
Server:         80.67.169.40
Address:        80.67.169.40&lt;span class=&quot;co0&quot;&gt;#53&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;
An alternative is to use the NetworkManager.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Solution 2&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;solution_2&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:12,&amp;quot;range&amp;quot;:&amp;quot;5539-6093&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit13&quot; id=&quot;services_providers&quot;&gt;Services providers&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; bring a special care to the choice of service providers you use. For example if your country is under surveillance (like France), avoid as much as possible services from this country (Orange, SFR, etc.). A good idea is to configure Tor in order to never use an exit node in this country;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Services providers&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;services_providers&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:4,&amp;quot;secid&amp;quot;:13,&amp;quot;range&amp;quot;:&amp;quot;6094-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 24 Nov 2017 21:52:49 +0000</pubDate>
        </item>
        <item>
            <title>steganography</title>
            <link>https://wiki.cedricbonhomme.org/security:steganography?rev=1624746999&amp;do=diff</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;installation_of_stegano&quot;&gt;Installation of Stegano&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
For the examples you need to install Stegano.
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;sudo&lt;/span&gt; pip &lt;span class=&quot;kw2&quot;&gt;install&lt;/span&gt; Stegano&lt;/pre&gt;

&lt;p&gt;
You can read the &lt;a href=&quot;http://stegano.readthedocs.io&quot; class=&quot;urlextern&quot; title=&quot;http://stegano.readthedocs.io&quot; rel=&quot;ugc nofollow&quot;&gt; documentation of Stegano&lt;/a&gt; (included in the sources).
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Installation of Stegano&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;installation_of_stegano&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-239&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit2&quot; id=&quot;steganography&quot;&gt;Steganography&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
Steganography is the art and science of writing hidden messages.
&lt;/p&gt;

&lt;p&gt;
Some steganography techniques:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Physical steganography;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Digital steganography;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Network steganography;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Printed steganography.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
We will dive into digital steganography.
&lt;/p&gt;

&lt;p&gt;
The following sections will present some techniques of digital steganography.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Steganography&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;steganography&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;240-596&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;simple_steganography_art&quot;&gt;Simple steganography art&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
In computer science a well known method of hiding data (message) is to concatenate these data to an archive.
For example, if I want to hide a text file in a music file:
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;$ &lt;span class=&quot;kw2&quot;&gt;zip&lt;/span&gt; text-to-hide.zip text-to-hide.txt
$ &lt;span class=&quot;kw2&quot;&gt;cat&lt;/span&gt; Stop_And_Stare.ogg test-to-hide.zip &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; OneRepublic_-_Stop_And_Stare-&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;.ogg&lt;/pre&gt;

&lt;p&gt;
Now you can still listen the song. If you want to recover the text, you just have to unzip the song.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Simple steganography art&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;simple_steganography_art&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;597-1046&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;using_the_red_portion_of_a_pixel&quot;&gt;Using the red portion of a pixel&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
An other simple method is to use the red portion of a pixel to hide &lt;abbr title=&quot;American Standard Code for Information Interchange&quot;&gt;ASCII&lt;/abbr&gt; messages.
&lt;/p&gt;

&lt;p&gt;
For example the pixel P1 = (R, G, B) will become P1&amp;#039; = (ord(ascii_character), G, B).&lt;br/&gt;

We are working at the &lt;strong&gt;byte&lt;/strong&gt; level.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Using the red portion of a pixel&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;using_the_red_portion_of_a_pixel&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:2,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;1047-1305&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit5&quot; id=&quot;simple_example_of_implementation&quot;&gt;Simple example of implementation&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; hide&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;img&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; message&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;
    Hide a message (string) in an image.
&amp;nbsp;
    Use the red portion of a pixel (r, g, b) tuple to
    hide the message string characters as ASCII values.
    The red value of the first pixel is used for length of string.
    &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
    length &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;message&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# Limit length of message to 255&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; length &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;# Use a copy of image to hide the text in&lt;/span&gt;
    encoded &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; img.&lt;span class=&quot;kw3&quot;&gt;copy&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    width&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; height &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; img.&lt;span class=&quot;me1&quot;&gt;size&lt;/span&gt;
    index &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; row &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;height&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; col &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;width&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
            &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; g&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; img.&lt;span class=&quot;me1&quot;&gt;getpixel&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;col&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;# first value is length of message&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; row &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; col &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; index &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; length:
                asc &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; length
            &lt;span class=&quot;kw1&quot;&gt;elif&lt;/span&gt; index &lt;span class=&quot;sy0&quot;&gt;&amp;lt;=&lt;/span&gt; length:
                c &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; message&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;index -&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
                asc &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;ord&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;c&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
                asc &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; r
            encoded.&lt;span class=&quot;me1&quot;&gt;putpixel&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;col&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;asc&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; g &lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            index +&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; encoded&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Simple example of implementation&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;simple_example_of_implementation&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:2,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;1306-2335&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit6&quot; id=&quot;least_significant_bit_method&quot;&gt;Least Significant Bit method&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
The least significant bit (lsb) is the bit position in a binary integer giving the units value, that is, determining whether the number is even or odd. The lsb is sometimes referred to as the right-most bit, due to the convention in positional notation of writing less significant digits further to the right. It is analogous to the least significant digit of a decimal integer, which is the digit in the ones (right-most) position.
&lt;/p&gt;

&lt;p&gt;
The data are inserted in place of the less significant bit. For each RGB component there are 256 possible values and we vary only the least significant bit. Consequently the LSB technique has a very little impact on the colour of the pixel.
&lt;/p&gt;

&lt;p&gt;
For example the pixel P1 = (R, G, B) = (0000000&lt;strong&gt;0&lt;/strong&gt;, 0000000&lt;strong&gt;1&lt;/strong&gt;, 0000000&lt;strong&gt;0&lt;/strong&gt;) will become P1&amp;#039; = (R, G, B) = (0000000&lt;strong&gt;1&lt;/strong&gt;, 0000000&lt;strong&gt;0&lt;/strong&gt;, 0000000&lt;strong&gt;1&lt;/strong&gt;)&lt;br/&gt;

We are working at the &lt;strong&gt;bit&lt;/strong&gt; level.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Least Significant Bit method&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;least_significant_bit_method&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:3,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;2336-3248&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit7&quot; id=&quot;simple_example_of_implementation1&quot;&gt;Simple example of implementation&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; hide&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;img&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; message&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;
    Hide a message (string) in an image with the
    LSB (Least Significant Bit) technique.
    &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
    encoded &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; img.&lt;span class=&quot;kw3&quot;&gt;copy&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    width&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; height &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; img.&lt;span class=&quot;me1&quot;&gt;size&lt;/span&gt;
    index &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
&amp;nbsp;
    message &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; message + &lt;span class=&quot;st0&quot;&gt;'~~~'&lt;/span&gt;
    message_bits &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;tools.&lt;span class=&quot;me1&quot;&gt;a2bits_list&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;message&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    npixels &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; width * height
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;message_bits&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; npixels * &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Too long message (%s &amp;gt; %s).&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt; % &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;message_bits&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; npixels * &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; row &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;xrange&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;height&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; col &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;xrange&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;width&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; index + &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;message_bits&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; :
&amp;nbsp;
                &lt;span class=&quot;co1&quot;&gt;# Get the colour component.&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; g&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; img.&lt;span class=&quot;me1&quot;&gt;getpixel&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;col&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;co1&quot;&gt;# Change the Least Significant Bit of each colour component.&lt;/span&gt;
                r &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; tools.&lt;span class=&quot;me1&quot;&gt;setlsb&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; message_bits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;index&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                g &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; tools.&lt;span class=&quot;me1&quot;&gt;setlsb&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;g&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; message_bits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;index+&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                b &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; tools.&lt;span class=&quot;me1&quot;&gt;setlsb&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;b&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; message_bits&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;index+&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;co1&quot;&gt;# Save the new pixel&lt;/span&gt;
                encoded.&lt;span class=&quot;me1&quot;&gt;putpixel&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;col&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; g &lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; b&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
            index +&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; encoded&lt;/pre&gt;

&lt;p&gt;
This is a very simple example showing how to hide a string in an image with the LSB method.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Simple example of implementation&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;simple_example_of_implementation1&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:3,&amp;quot;secid&amp;quot;:7,&amp;quot;range&amp;quot;:&amp;quot;3249-4452&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit8&quot; id=&quot;steganalysis&quot;&gt;Steganalysis&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Steganalysis&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;steganalysis&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:4,&amp;quot;secid&amp;quot;:8,&amp;quot;range&amp;quot;:&amp;quot;4453-4479&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit9&quot; id=&quot;steganalysis_of_the_lsb_method&quot;&gt;Steganalysis of the LSB method&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Below the original image and the steganalysed one.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://wiki.cedricbonhomme.org/_detail/security:2010-08-04t15:42:06.png?id=security%3Asteganography&quot; class=&quot;media&quot; title=&quot;security:2010-08-04t15:42:06.png&quot;&gt;&lt;img src=&quot;https://wiki.cedricbonhomme.org/_media/security:2010-08-04t15:42:06.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;Original&quot; alt=&quot;Original&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://wiki.cedricbonhomme.org/_detail/security:2010-08-04t15:42:06_steganalysed.png?id=security%3Asteganography&quot; class=&quot;media&quot; title=&quot;security:2010-08-04t15:42:06_steganalysed.png&quot;&gt;&lt;img src=&quot;https://wiki.cedricbonhomme.org/_media/security:2010-08-04t15:42:06_steganalysed.png&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;Steganalysis of the original image&quot; alt=&quot;Steganalysis of the original image&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Below the same image with a hidden text and its steganalysis.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://wiki.cedricbonhomme.org/_detail/security:2010-08-04t15:42:06_enc.png?id=security%3Asteganography&quot; class=&quot;media&quot; title=&quot;security:2010-08-04t15:42:06_enc.png&quot;&gt;&lt;img src=&quot;https://wiki.cedricbonhomme.org/_media/security:2010-08-04t15:42:06_enc.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;Image with hidden text&quot; alt=&quot;Image with hidden text&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://wiki.cedricbonhomme.org/_detail/security:2010-08-04t15:42:06_enc_steganalysed.png?id=security%3Asteganography&quot; class=&quot;media&quot; title=&quot;security:2010-08-04t15:42:06_enc_steganalysed.png&quot;&gt;&lt;img src=&quot;https://wiki.cedricbonhomme.org/_media/security:2010-08-04t15:42:06_enc_steganalysed.png&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;Steganalysis of the image with hidden text&quot; alt=&quot;Steganalysis of the image with hidden text&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
This technique simply consist to replace odd components by 255 and even number by 0. This means that the pixel (132, 247, 123) become (0, 255, 255).
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Steganalysis of the LSB method&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;steganalysis_of_the_lsb_method&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:4,&amp;quot;secid&amp;quot;:9,&amp;quot;range&amp;quot;:&amp;quot;4480-5093&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit10&quot; id=&quot;steganalysis_of_the_lsb_method_with_sets&quot;&gt;Steganalysis of the LSB method with sets&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
You must &lt;a href=&quot;https://wiki.cedricbonhomme.org/security:steganography#installation_of_stegano&quot; class=&quot;wikilink1&quot; title=&quot;security:steganography&quot; data-wiki-id=&quot;security:steganography&quot;&gt;install Stegano&lt;/a&gt; before running these commands.
&lt;/p&gt;

&lt;p&gt;
First, we will hide a message in a picture with the simple LSB method and with the LSB method + sets.
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;$ &lt;span class=&quot;kw3&quot;&gt;cd&lt;/span&gt; stegano
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# LSB with The Eratosthenes set&lt;/span&gt;
$ slsb-set &lt;span class=&quot;re5&quot;&gt;--hide&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; .&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;examples&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;pictures&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach.png &lt;span class=&quot;re5&quot;&gt;-o&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach-enc-gen.png &lt;span class=&quot;re5&quot;&gt;--generator&lt;/span&gt; eratosthenes &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; .&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;examples&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lorem_ipsum.txt
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# LSB only&lt;/span&gt;
$ slsb &lt;span class=&quot;re5&quot;&gt;--hide&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; .&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;examples&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;pictures&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach.png &lt;span class=&quot;re5&quot;&gt;-o&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach-enc.png  &lt;span class=&quot;re5&quot;&gt;-f&lt;/span&gt; ..&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;examples&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;lorem_ipsum.txt&lt;/pre&gt;

&lt;p&gt;
The selected generator &lt;em&gt;Sieve of Eratosthenes&lt;/em&gt; (&lt;code&gt;–generator eratosthenes&lt;/code&gt;) will generate the set of points. This set of points will be used in order to select the pixels where the informations will be hidden.
&lt;/p&gt;

&lt;p&gt;
The following will generate the corresponding steganalysed pictures (left column):
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;# Steganalysis of the original image&lt;/span&gt;
$ steganalysis-parity &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; ..&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;examples&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;pictures&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach.png &lt;span class=&quot;re5&quot;&gt;-o&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach-steg.png 
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# Steganalysis of the image with hidden text (LSB only)&lt;/span&gt;
$ steganalysis-parity &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach-enc.png &lt;span class=&quot;re5&quot;&gt;-o&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach-enc-steg.png 
&amp;nbsp;
&lt;span class=&quot;co0&quot;&gt;# Steganalysis of the image with hidden text (LSB + Eratosthenes)&lt;/span&gt;
$ steganalysis-parity &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach-enc-gen.png &lt;span class=&quot;re5&quot;&gt;-o&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach-enc-gen-steg.png &lt;/pre&gt;

&lt;p&gt;
&lt;a href=&quot;https://wiki.cedricbonhomme.org/_detail/security:montenach.png?id=security%3Asteganography&quot; class=&quot;media&quot; title=&quot;security:montenach.png&quot;&gt;&lt;img src=&quot;https://wiki.cedricbonhomme.org/_media/security:montenach.png?w=700&amp;amp;tok=c2fe57&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;Original image&quot; alt=&quot;Original image&quot; width=&quot;700&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://wiki.cedricbonhomme.org/_detail/security:montenach-steg.png?id=security%3Asteganography&quot; class=&quot;media&quot; title=&quot;security:montenach-steg.png&quot;&gt;&lt;img src=&quot;https://wiki.cedricbonhomme.org/_media/security:montenach-steg.png?w=700&amp;amp;tok=277072&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;(1) Steganalysis of the original image&quot; alt=&quot;(1) Steganalysis of the original image&quot; width=&quot;700&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://wiki.cedricbonhomme.org/_detail/security:montenach-enc.png?id=security%3Asteganography&quot; class=&quot;media&quot; title=&quot;security:montenach-enc.png&quot;&gt;&lt;img src=&quot;https://wiki.cedricbonhomme.org/_media/security:montenach-enc.png?w=700&amp;amp;tok=f2758f&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;Image with hidden text  (LSB only)&quot; alt=&quot;Image with hidden text  (LSB only)&quot; width=&quot;700&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://wiki.cedricbonhomme.org/_detail/security:montenach-enc-steg.png?id=security%3Asteganography&quot; class=&quot;media&quot; title=&quot;security:montenach-enc-steg.png&quot;&gt;&lt;img src=&quot;https://wiki.cedricbonhomme.org/_media/security:montenach-enc-steg.png?w=700&amp;amp;tok=d02ec7&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;(2) Steganalysis of the image with hidden text (LSB only)&quot; alt=&quot;(2) Steganalysis of the image with hidden text (LSB only)&quot; width=&quot;700&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://wiki.cedricbonhomme.org/_detail/security:montenach-enc-gen.png?id=security%3Asteganography&quot; class=&quot;media&quot; title=&quot;security:montenach-enc-gen.png&quot;&gt;&lt;img src=&quot;https://wiki.cedricbonhomme.org/_media/security:montenach-enc-gen.png?w=700&amp;amp;tok=9f8943&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;Image with hidden text  (LSB + Eratosthenes)&quot; alt=&quot;Image with hidden text  (LSB + Eratosthenes)&quot; width=&quot;700&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://wiki.cedricbonhomme.org/_detail/security:montenach-enc-gen-steg.png?id=security%3Asteganography&quot; class=&quot;media&quot; title=&quot;security:montenach-enc-gen-steg.png&quot;&gt;&lt;img src=&quot;https://wiki.cedricbonhomme.org/_media/security:montenach-enc-gen-steg.png?w=700&amp;amp;tok=939584&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;(3) Steganalysis of the image with hidden text (LSB + Eratosthenes)&quot; alt=&quot;(3) Steganalysis of the image with hidden text (LSB + Eratosthenes)&quot; width=&quot;700&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Compare the pictures 1 and  2 and compare the pictures 1 and 3, left column.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Steganalysis of the LSB method with sets&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;steganalysis_of_the_lsb_method_with_sets&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:4,&amp;quot;secid&amp;quot;:10,&amp;quot;range&amp;quot;:&amp;quot;5094-7002&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit11&quot; id=&quot;reveal_the_message&quot;&gt;Reveal the message&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code bash&quot;&gt;$ slsb-set &lt;span class=&quot;re5&quot;&gt;--reveal&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--generator&lt;/span&gt; eratosthenes &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach-enc-gen.png &lt;span class=&quot;re5&quot;&gt;-b&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;file-gen.txt
$ slsb &lt;span class=&quot;re5&quot;&gt;--reveal&lt;/span&gt;  &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach-enc.png &lt;span class=&quot;re5&quot;&gt;-b&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;file.txt
$ &lt;span class=&quot;kw2&quot;&gt;cmp&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;file-gen.txt ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;file.txt 
$ &lt;span class=&quot;kw2&quot;&gt;cat&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;file.txt 
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam placerat fermentum
lorem, at porttitor metus congue eu. Mauris vitae tell
.
.
.
$ slsb-set &lt;span class=&quot;re5&quot;&gt;--reveal&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--generator&lt;/span&gt; fermat &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach-enc-gen.png &lt;span class=&quot;re5&quot;&gt;-b&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;file.txt
Impossible to detect message.
&amp;nbsp;
$ slsb-set &lt;span class=&quot;re5&quot;&gt;--reveal&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;--generator&lt;/span&gt; mersenne &lt;span class=&quot;re5&quot;&gt;-i&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Montenach-enc-gen.png &lt;span class=&quot;re5&quot;&gt;-b&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;file.txt
Impossible to detect message.&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Reveal the message&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;reveal_the_message&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:6,&amp;quot;secid&amp;quot;:11,&amp;quot;range&amp;quot;:&amp;quot;7003-7614&amp;quot;} --&gt;
&lt;h1 class=&quot;sectionedit12&quot; id=&quot;bibliography&quot;&gt;Bibliography&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;https://wiki.cedricbonhomme.org/tag:security?do=showtag&amp;amp;tag=security&quot; class=&quot;wikilink1&quot; title=&quot;tag:security&quot; rel=&quot;tag&quot;&gt;security&lt;/a&gt;,
	&lt;a href=&quot;https://wiki.cedricbonhomme.org/tag:steganography?do=showtag&amp;amp;tag=steganography&quot; class=&quot;wikilink1&quot; title=&quot;tag:steganography&quot; rel=&quot;tag&quot;&gt;steganography&lt;/a&gt;,
	&lt;a href=&quot;https://wiki.cedricbonhomme.org/cs_lang:python&quot; class=&quot;wikilink1&quot; title=&quot;cs_lang:python&quot; rel=&quot;tag&quot;&gt;python&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Bibliography&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;bibliography&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:7,&amp;quot;secid&amp;quot;:12,&amp;quot;range&amp;quot;:&amp;quot;7615-&amp;quot;} --&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 26 Jun 2021 22:36:39 +0000</pubDate>
        </item>
        <item>
            <title>tools</title>
            <link>https://wiki.cedricbonhomme.org/security:tools?rev=1624747626&amp;do=diff</link>
            <description>
&lt;p&gt;
Useful tools you really need on your computer:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; pass&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; 2FA&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; GnuPG&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Emacs&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Useful applications for your Android smartphone;
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Signal&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Orbot&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Element&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 26 Jun 2021 22:47:06 +0000</pubDate>
        </item>
    </channel>
</rss>
