<?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 Hiten Sangtani on Medium]]></title>
        <description><![CDATA[Stories by Hiten Sangtani on Medium]]></description>
        <link>https://medium.com/@hitensangtani89?source=rss-87854fc154f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oY1PkL-uu2qqXy3Vkf-VPw.jpeg</url>
            <title>Stories by Hiten Sangtani on Medium</title>
            <link>https://medium.com/@hitensangtani89?source=rss-87854fc154f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 11:31:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hitensangtani89/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[Fundamentals of Hash algorithms and brief explanation of SHA1 algorithm.]]></title>
            <link>https://medium.com/@hitensangtani89/fundamentals-of-hash-algorithms-and-brief-explanation-of-sha1-algorithm-5fcff2473515?source=rss-87854fc154f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fcff2473515</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[alg]]></category>
            <category><![CDATA[cryptography]]></category>
            <dc:creator><![CDATA[Hiten Sangtani]]></dc:creator>
            <pubDate>Mon, 02 Sep 2019 08:54:44 GMT</pubDate>
            <atom:updated>2019-09-02T08:54:44.191Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Fundamentals of Hash algorithms and brief explanation of SHA1 algorithm.</strong></p><p>We all are in an era where information transfer on internet is very common and without that our communication can’t be done properly.It becomes very easy to share any file or message on the internet and within few minutes or seconds(in case of message passing) very convenient!! But we also have to consider a thing that internet is a vast network containing many users and they all are willing to share information online.</p><p>Now simple concept is used for message passing on internet packet from the sender side having the exact address of the receiver is sent to receiver and then receiver receives the message and by the address of the sender it identifies the information about the sender.But as mentioned there are many users on the internet and the packets are sent into the same environment (generally through air) so what happens if some other user interferes the packet which was not sent to him? How we can ensure that the message sender has sent is only correctly received by the receiver? So there is a need of some kind of mechanism which ensures that messages are only received by the users who are intended to receive.</p><p>Hashing functions are designed for this purpose. Hashing is the transformation of a string of characters into a usually shorter fixed-length value or key that represents the original string. Hashing is used to index and retrieve items because it is faster to find the item using the shorter hashed key than to find it using the original value. It is also used in many encryption algorithms.So that if anyone has interfered a message yet,they would not be able to retrieve the correct information as info will be Hashed.</p><p>Now in cryptography hash functions are extremely useful and appear in almost all information security applications.A hash function is a mathematical function that converts a numerical input value into another compressed numerical value. The input to the hash function is of arbitrary length but output is always of fixed length.Values returned by a hash function are called <strong>message digest</strong> or simply <strong>hash values</strong>. The following picture illustrated hash function .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*DhgeadMTKiKjnBprGfSFxw.jpeg" /><figcaption>Simple Explanation of Hash function.</figcaption></figure><p>Features of hash functions.</p><ol><li>Hash function converts data of arbitrary length to a fixed length. This process is often referred to as <strong>hashing the data</strong>.</li><li>In general, the hash is much smaller than the input data, hence hash functions are sometimes called <strong>compression functions</strong>.</li><li>Since a hash is a smaller representation of a larger data, it is also referred to as a <strong>digest</strong>.</li><li>Hash function with n bit output is referred to as an <strong>n-bit hash function</strong>. Popular hash functions generate values between 160 and 512 bits.</li></ol><p>In order to be an effective cryptographic tool, the hash function is desired to possess the following property. if a hash function h produced a hash value z, then it should be a difficult process to find any input value x that hashes to z.In other words, if a hash function h for an input x produces hash value h(x), then it should be difficult to find any other input value y such that h(y) = h(x).There are many hashing functions available like MD5, SHA0, SHA1, SHA2 , SHA3 etc.</p><p>Now in this section we will talk about SHA1 algorithm briefly. In cryptography, SHA-1 is a cryptographic hash function which takes an input and produces a 160-bit(20-byte) hash value known as a message digest typically rendered as a hexadecimal number, 40 digits long.There are basic 5 hash values by default h0,h1,h2,h3,h4 and they all are 32 bits long so total 160 bits.Which is then rendered as 40 digit long message.</p><p>Basically there is one loop which takes input in multiple of 512-bits blocks.Now whenever the message is passed into the hash function it copies the 5 hash functions into another 5 variables let’s say (a,b,c,d,e).Now the values of these 5 new hash variables are jumbled in such way that they are always unique that is done by the hash function.Now new generated hash variables are added with the default 5 hash variables in this way the unique key is generated for every message,interesting is that if there is even a slight change in the message, the entire key is changed so there are very less chances of cracking the key.However SHA1 algorithm is no longer used because of the advancement in the other versions of this algorithms like SHA2, SHA3.</p><p>Now suppose that the message length is not in multiples of 512 (usually happens in the last block of the message) then concept of padding is used and is assured that the length of the message is always in the multiples of 512 bits. Following figure will clear the concept further more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*MMNGa1p63Y8Q2_f0pH2dIw.jpeg" /></figure><p>Here seed value is the default value of 5 hash variables.The loop is terminated after the entire message is processed.There are some web sites also available who provide the facility to count the Hash value for different hash algorithms. e.g. <a href="http://www.sha1-online.com/">www.sha1-online.com</a> etc.This was just the basic idea of how hash functions work the concept discussed here is used in most of the hash algorithms.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fcff2473515" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple Explanation of Page Rank Algorithm]]></title>
            <link>https://medium.com/@hitensangtani89/simple-explanation-of-page-rank-algorithm-8c5c8ff3478d?source=rss-87854fc154f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c5c8ff3478d</guid>
            <category><![CDATA[seo]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[pagerank]]></category>
            <dc:creator><![CDATA[Hiten Sangtani]]></dc:creator>
            <pubDate>Sat, 31 Aug 2019 18:55:33 GMT</pubDate>
            <atom:updated>2019-08-31T20:03:28.505Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Simple Explanation of Page Rank Algorithm which is used by Google to Filter Search queries into Particular order.</strong></h3><p>Have you ever wondered what happens when you type something on google and just press on the search icon? That is easy right? It will give you millions of search results based on your query in less than 1 or 2 seconds. Astonishing! right?For example i searched on the google (download songs) and i got the following results and you can see that i got about 4,91,00,00,000 results in 0.54 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YHS82lztqXb5MRX2k65rPw.jpeg" /><figcaption>Search results for query (download songs).</figcaption></figure><p>But have you ever thought how it does something like that in such a very short period of time and yet giving you the best search result without any glitch? Ever thought why particular web page is on first number? as in my case i got (www.saregama.com) page as my first search result.Now in this article i will try to explain you the basic fundamentals for that.</p><p>Now, basically what google does is that it applies some algorithms and based on that algorithms they give us the search results. Looks simple right?,but it is not as simple as it sounds because there are literally millions of web sites on the internet and they all are updating on daily basis,so this process is very complicated and time consuming but google has developed some algorithms for doing this job.Page rank is one of the many algorithms which are used for this purpose.</p><p>Page Rank (PR) is an algorithm used by Google Search to rank websites in their search engine results. Page Rank was named after Larry Page, one of the founders of Google. Page Rank is a way of measuring the importance of website pages. According to Google: Page Rank works by counting the <strong>number</strong> and <strong>quality</strong> of links to a page to determine a rough estimate of how important the website is. The underlying assumption is that more important websites are likely to receive more links from other websites. It is not the only algorithm used by Google to order search engine results, but it is the first algorithm that was used by the company, and it is the best-known.At the heart of Page Rank is a mathematical formula</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*eg9Zf0LtFcVTz4suYN4w1w.jpeg" /></figure><p>i.e. the Page Rank value for a page (<em>pi</em>)is dependent on the Page Rank values for each page (<em>pj</em>)contained in the set M<em>(pi)</em>(the set containing all the pages linking to page <em>pi</em>), divided by the number L(<em>pj</em>) of links from page <em>pj</em>. The algorithm involves a damping factor “d” for the calculation of the page Rank.Now Basically The Page Rank theory holds that an imaginary surfer who is randomly clicking on links will eventually stop clicking. The probability, at any step, that the person will continue is a damping factor <em>d</em>. Various studies have tested different damping factors, but it is generally assumed that the damping factor will be set around 0.85.Here N is the number of total web pages on the internet.</p><p>Now how this damping factor is calculated is a bit out of context here we just need to understand how web pages are assigned page-ranks and i am sure that from the above formula it is quite confusing that how it works so let me simplify this for you. Suppose that we have a network of web pages like this…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j0q3azBRtrvplUEz_CLThQ.jpeg" /></figure><p>From the above graph we can see that there are 4 web pages. Now A has a link to page B and C, Page B has a link to page D, page C has links to page B, page A and Page D. Page D has no link to any of the pages in the network. Now for simplicity initially all the pages are assign to a default page ranks ( which is 1 divided by no.of total pages). Here the value is 0.25(1/4). For simplicity purpose we are not considering damped factor(d) here i will explain it in last.</p><p>Now let us count the page ranks of different pages. Now to do that we will only consider pages <strong>which are linking to a page of which we are finding a page rank.</strong></p><p>For example let us take page A. To count a page rank of A we will simply divide the page rank values of the pages which are pointing to page A by number of links which are outgoing from that pages.Initially here page ranks of all the pages are 0.25.We will use short notation “PR” for page rank.</p><p>PR(A) = PR(C)/3 = 0.25/3 = 0.0833</p><p>(Here we divided by 3 because page C is pointing to 3 other pages (A, B,D and no other page is pointing to A.)</p><p>Similarly for B</p><p>PR(B) = PR(A)/2 + PR(C)/3 = 0.125+0.0833 = 0.2083</p><p>(Here we divided PR(A) with 2 because it is pointing to 2 other pages (B and C ). similarly for page C we divided PR(C) with 3.</p><p>Similarly For C and D we will get PR(C) = 0.375 and PR(D) = 0.3333.</p><p>We simply counted the page rank values for only one iteration but actually the iterations are far more but for real there are millions of websites on the internet thus iterative method can be tedious.It is proved that after certain amount of iterations page rank value will be repeated for a particular web page on the network (most probably 100 iterations). So in this way Page rank values are counted for web pages on the network.</p><p>From our above calculations we can see that page rank of C is highest in the network so Page C is the most important web page but if we observe we can see that 2nd most important web page is D. Now some of you might get confused because from the graph we can see that there are two incoming links for page B and page D then how come D is more important than B? despite of getting refereed by equal number of pages.</p><p>Here comes the beauty of this algorithm though page B and D both are getting equal references but D is getting reference by Page C and B and Page B is getting reference by page C and page A. So clearly we can see that page C is common but page B has higher page rank than page A and is referring to page D so page D is 2nd most important web page not page B.</p><p>Now let us briefly talk about damping factor “d”. So after calculating page ranks we have to multiply the page ranks by d because simply d is a probability that the Surfer or User might click that link in that particular web page and then we also have to add the value of ( 1 — d /N) into the new page rank value.Now what is (1 — d/N)? It is the minimum page rank value for any page. Suppose if some random page in the network is not refereed by any page. Now we saw that probability of clicking the particular link is d then probability of not getting a click will be ( 1 — d). So the page which is not refereed by any page will still have some page rank value equal to ( 1 — d/N).</p><p>Now it might happen that some web page creators create random dummy pages to refer to their main page so that they get higher page rank to appear in the top of the search. But as we saw in our analysis that reference numbers are important but it is also important that from which source the references are coming? If references are coming from the page which is not at all refereed by any page or less refereed by any page then that page will not affect the page rank of the page which it is referring to.</p><p>And Google also has this facility of cleaning the dummy pages as soon as the algorithm finds that the page is not refereed by to many pages it will simply discard that page from counting.Here we have to take note that if any page is refereeing to it self is not counted in the calculation.</p><p>That was just a basic idea how search results are getting displayed,but there are more complex algorithms and methods for doing that.Let us look at some other factors before ending this article.</p><p>Suppose there are some kind of web pages who provide reviews for travelling destinations and hotels and etc stuff. Now suppose that by above algorithms and some more complex methods particular page is getting higher page rank value but that page is not updated for a long time so that page will not be displayed.The reason is that the information about hotel and reviews keep changing over a short period of time so now Google will only display the results which satisfy all the constrains of a searched query.This was just one example that how this algorithm is not the only thing for prioritizing the web pages.In Actual scenario these processes are to much complicated but this article was just to give you some basic idea about how it works That’s all…</p><p>Hope you liked it and enjoyed reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c5c8ff3478d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>