Wednesday, April 21, 2021

How to clone MAC address in TPLink Routers

 Prerequisites:

  1. Connect your computer through wireless/wired connection

  2. Note the mac addresses of the device that you want to allow or deny the connection

Note: MAC addresses filtration is sort of applying access control list for the any connection


Follow the steps below:

  1. Locate the default access address of the TPLink wifi router.

 (Most of the time it will be at the back of the wireless device as shown in the picture below)

  1. Enter the Default access address (example http://www.tplinklogin.net on your browser)

( You will be directed to the login page, if it is not redirecting, then check your cable or wireless connection of that router to your computer)



  1. Enter the credentials

(Most of the device have both password and username as admin admin unless you did not change)

  1. If the login is successful go to the network section and search for clone MAC menu

  2. Click on Clone Mac link and you will be directed to the page shown below


  1. Click on Clone MAC address and enter the MAC addresses you want to clone

  2. There are two filtering rules where you can allow/deny the connection of the listed MAC address. Check the radio button as per your requirement.

8. After you are done click save and enjoy, it will converge your internet connection to only to your allowed devices.

For TPLink Router Archer C20
  1. After you login to the TP Link interface, go to the security
  2. Check for access control
  3. There you will see white list and blacklist, If you want to allow connection for devices of listed MAC address then check whitelist and if you want to deny the connection then check the black list.
  4. Click the add button to add MAC addresses of the devices
  5. Click on save button and enjoy the convergence.

Sunday, March 14, 2021

Blockchain: An emerging technology

  What is blockchain technology?

“A blockchain is a growing list of records, called blocks, that are linked using cryptography. Each block contains cryptographic hash of the previous block, a timestamp, and transaction data(generally represented as a merkle tree).”

          ~ wikipedia

To visualize blockchain technology, it is a chain of blocks where each block contains a group of data that has been collected at the same timestamp. Those blocks are related to one another in a way that a block will have an address of its previous block.  In a nutshell, the diagram below will demonstrate the theoretical concept of how block chain works.



Fig.01


The hashes generated by SHA256 are hexadecimal numbers(base 16) and each hexadecimal number will have 4 bits. There must be 256 bits in the hash generated by SHA256 algorithm and in the block hash, there will be 64 hexadecimal digits in SHA256 hashes. That is 256/4 = 64. Hashing Demo

Finally this is the network target with 19 leading zeros as of now that is set in the bitcoin network.

In fig.01 all the blocks are linked to one another, each having a unique address of the previous block. Each data in a block is encrypted using SHA256(Secure Hashing Algorithm where 256 is the number of bits) and final hash is a hash of those hashes generated using SHA256(term used for that hashing is called merkle tree and hash of a block is a merkle tree root).


How SHA256 works?

The encryption has a popular story during the time of general Julius Caesar, where he found an encryption technique called Caesar cipher in which letters were written in plaintext which cannot be understood by his enemy but only his trusted ones can replace by a letter some number of positions down the alphabet. For example, with a right shift 5, A would be replaced by E and that is how they decoded the letter at receiver end. The encryption techniques have developed over the years and SHA256 is so far a one way encryption algorithm. Any information that is encrypted using this algorithm cannot be decrypted. 


The hashes generated by SHA256 are hexadecimal numbers(base 16) and each hexadecimal number will have 4 bits. There must be 256 bits in the hash generated by SHA256 algorithm and in the block hash, there will be 64 hexadecimal digits in SHA256 hashes. That is 256/4 = 64. Hashing Demo



Why blockchain?

The very purpose of blockchain is to get rid of intermediaries like banks and involving any other witnesses that are centralised. For example if we are sending money via apps developed by banks and if their server gets crashed then the transaction history and your balance will not be there. Marke Gates states “Even in the United states, which has one of the most developed and regulated financial systems in the world, major financial institutions failed during the Great Financial Crisis. Financial companies that had existed for hundreds of years collapsed overnight taking people’s saving with them.” Sometimes we cannot say how safe our savings are with the bank. 


Another example can be land transactions, it requires a witness agency where the transaction becomes expensive and time consuming. Moreover, if that agency loses your transaction details and later if someone claims that it's their property, then the owner of that property becomes anonymous. 


Blockchain addresses those issues as the ledger that maintains the transactions is immutable because if someone tries to manipulate a block that contains your transaction, then all the successive blocks become invalid. How?


Distributed P2P network

Even if the hacker is successful in that way, he is being successful only in one machine. In the blockchain network there are countless nodes and miners who have the copy of the previous blockchain. The copy of blockchain is distributed amongst the peers in a network and is updated each time a new block is added. As and when the hacker releases his hacked blockchain, it is being compared with other nodes in the blockchain and replaced with the blockchain that the majority of the nodes have . For a hacker to be successful he must hack more than 50% of machines through consensus protocol which is practically impossible by a hacker. That makes blockchain a dynamic and secure web application.

 

“Blockchain technology has the ability to optimize the global infrastructure to deal with global issues in this space much more efficiently than current systems.” -Marwan Forzley, Founder of Align Commerce.


How mining works?

There have been a set of valued people who argue with the perception of earning through hardship is more important than earning through lesser effort. Those are the values that are taught in those times and are still realizable in some sphere of life but with the technology emerging with the speed of light has apparently changed the angle of earning. One of the most popular and valued mining in the bitcoin network has given the world another chance to think, adapt, explore the smarter ways of earning.


The term mining in blockchain technology is a computational puzzle solved to add a new block in a blockchain and each time a node solved that puzzle gets a reward in the form of cryptocurrency. All the mining computers connected in the blockchain network share their computational powers and make the blockchain technology much more than supercomputers. In the bitcoin network, it is roughly 256 times faster than all the top 500 supercomputers around the globe combined(during the time of writing this paper) and it is expected to become more powerful. 

The specific task performed in mining is finding the number called Nonce(number only used once). What is so difficult in finding a number? The difficulty of getting a number is maintained by setting a network target to ensure the newly mined block is valid to add in a blockchain. 


For example in a dice, if the target is set below 4 then there are 4 in 6 chances of getting a number below 4 but if the target is set to 2 then there is only 1 in 6 chances of getting a number below 2. That is how the difficulty in finding nonce is maintained.

A programmed hardware for guessing a number that qualifies the network target is used and actually mining refers to finding numbers that qualifies network target to add a valid block on a blockchain.


Understanding mining difficulty

Image below shows details of a block in a bitcoin network and we will calculate the target of the network as on 15th Jan 2021, and try to understand how difficult it is to mined a block. There is information given on each of the blocks on https://www.blockchain.com. The block does not disclose the exact target with hexadecimal number but it shows in decimal number of bits.


  1. Target determination of a bitcoin

Given bits : 386,771,105

Corresponding Hexadecimal bits: 170DA8A1 Convert decimal to hexadecimal

Let's take first 2 digits and convert to decimal back: 17 (Last six digits used later)

Hexadecimal to Decimal Conversion = (1*16^1)+(7*16^0) How?

= 23 (Which is number of bytes)

      23 bytes = 23 * 8 bits (1 byte = 8 bits)

Each hexadecimal number has 4 bits= 23 * 2 * 4 bits

= 23 * 2 hexadecimal numbers

= 46 hex digits

Now it says that we have 46 hex digits inclusive of the last 6 hex digits derived earlier(0DA8A1)and add 0s till 46th digit.


46 hex digits obtained:  0DA8A10000000000000000000000000000000000000000


As blockchains use SHA256 cryptography function, there must be 64 hex digits as discussed earlier. So, 64 - 46 = 18 and append 18 zeros before 46 hex digits:


0000000000000000000DA8A10000000000000000000000000000000000000000




In a bitcoin network, each block has a block hash of 64 hexadecimal numbers and the network target is delimited by the number of zeros in the hexadecimal hash in first digits. The more zeros in front of a hash, the more is the difficulty of finding a nonce.


As all the blocks are encrypted using a hash function and each block is cryptographically linked to one another, the slight change in data in a block will generate a completely different hash. And the immediate successive block has a hash of the previous block which is now different then the blocks after that becomes invalid. To correct the blocks after the tempered block, then the blocks must be mined again.

B. Mining Difficulty calculation


Current target: 0000000000000000000DA8A10000000000000000000000000000000000000000

Total possible 64 digits hex number is : 16^64 = 1.15 * 10^77 = 10^77 (approx.)

Total valid hashes with 19 leading zero: 16^(64-19) = 1.53 *10^54 = 2 * 10^54 (Approx.)

Probability that a randomly picked  hash is valid = (2*10^54)/10^77

         = 2 * 10^-23

  = 0.00000000000000000000002%


In bitcoin network, a new valid block is added after every 10 minutes and the difficulty level is adjusted after every 2016 blocks i.e every after two weeks. So the chance of getting a valid hash is very less and it needs high computational power to get a nonce that generates a hash qualifying network target.

Since the bitcoin blockchain gained popularity only in 2016 with increasing numbers of miners and nodes, there is a rise in difficulty level for solving the puzzle because if 10 miners can easily mine a block in 10 minutes then, 20 users will solve it more quickly. Therefore, the difficulty is maintained to keep the same pace of adding a block.






Wednesday, February 12, 2020

Significance of Jarung Khashor Chorten



Orally Transmitted
Jarung Khashor iconic Story




INTRODUCTION

This is the story I heard from one of my teachers about the significance of Jarung Khashor Stupa in Nepal. Some sources say that the Jarung Khashor stupa is the only place where the dissemination of Buddhism took place and the stupa is still believed to be wish fulfilling after the anecdote of great beings of Tibet. Their superpowers made Buddhism, one of the prominent religions in the world and said to have liberated many beings from the samsaric lives during their time and flourished buddhism in many parts of the world.


Origin of Yum Bjazee Saley
As per the oral history, the construction of stupa originated from the heart of Chenrezig (God of compassion) when Chenrezig was trying hard to empty the all beings from hell and he found never ending beings being in hell bearing different sort of punishment based on their karmic action. He felt very compassionate and had an unbearable sense of compassion from seeing those beings suffering excruciatingly for what they did in their previous lives. Uncontrollably, tears rolled down and he wiped with his two fingers and triggered that two fingers to the  sky wishing that with even his tears, let it help sentient beings to liberate from the suffering. Right after his selfless prayer, it is said that two drops of tears had given birth to two dakinis in god’s realm. However, one dakini is said to have committed sin stealing flowers while she stayed at god’s realm and for her sin, she was sent to the human body as poulterer for one of the king in Nepal and she was popularly referred to as “Yum Jadzee Saley”. 

Jarung Khashor naming convention

Yum Bjazee requested the king of Nepal to grant land to construct one stupa and the king asked Yum Bjazee about the size of the stupa that she can afford to construct as a poulterer. Yum Bjazee replied that the stupa will be of yak-skin sized area and the king granted verbally upon her request assuming it to be a small area that she can afford. Upon approval from the king, Yum Jadzee said to have cut yak skin to fine thread and made a circle from it covering the wide area of land (present size). The chamberlain upon seeing Yum Jadzee marking a wide area of land, reported to the King but the king said it is granted regardless of area the Yum has taken provided it is covered by Yak skin. That is the reason the stupa was named as Ja Rung (Let it be done) Kha Shor (slipped from my tongue) as the king let Yum Jadzee to construct stupa though the king assumed small area but as per the Yum’s coverage of land by the yak skin through her intelligence, the king kept his word as accepted before. Although Bjazee was just a worker under the king but she has four sons who stand behind her and they are also fully motivated as the mother was to construct the stupa no matter how their social status was. They began the construction of stupa and it is said that they are accompanied by one elephant to carry the boulders and required materials for stupa. However the Yum died before it was completed and that is the reason why the stupa has dome (Rugum) upside down for the legacy of their mother who selflessly worked so hard to bring the iconic stupa in the world.


Reasons for the Stupa considering as one of the wish full-filling structure
The four sons upon completion of stupa, stood before stupa and made the aspiration prayer individually. The first son aspired to be born as one of the kings who can spread dharma and help sentient beings to liberate from samsaric sufferings while praying he was stung by a bee where he unintendedly killed the bee even for a bee he prayed that, let the bee be born as my child. The second son wished to be a scholar who can translate dharma to the respective language to help all the being to hear, listen and practice dharma. The third son prayed to be one of the Yogi masters with the ability to subdue all the evils that bring destruction to the Buddha dharma. The fourth son solicit to be the minister with the capability to coordinate and organize all the dharmic activities without failure. However, the elephant who helped to construct the stupa left grief-stricken for not praying on his behalf by four brothers and upon hearing the brothers aspirations the elephant wished to be a devil who can destroy the dharma in bringing total destruction in the area of its prevalence. It is said that a crow on the top of the stupa heard the wishes of the elephant and the crow prayed to be born as a master who can subdue the elephant with the capabilities to retrieve the destroyed dharma.
Later, after their deaths all the four sons, an elephant and a crow are said to be born in a human body as per their wish and prayer. The first son was reborn as the king of Tibet and popularly known as king Thrisong Detsen, who adopted Buddhism as an official religion of the country and he constructed the first Buddhist monastery called Samye with seven Tibetan monks. The king had a daughter Pema Sal who passed away at the age of eight as a rebirth of a bee.  The second son was reborn as scholar Shantarakshita and later during the reign of Trisong Detsen some envoys were sent to Nepal and India to learn Buddhism and to obtain Buddhist text. The envoys learned about Shantarakshita in India  and recommended him as a Buddhist teacher to the king Trisong Detsen. The king invited Shantarakshita to diffuse buddhism in Tibet and he became the abbot of Samye monastery. Due to destruction forces from anti-buddhist the construction of Samye was very challenging and the king had to overcome hostile supernatural forces from the Bon demons thus, the Shantarakshita recommended the king to invite one of the tantric yogi master of Oddiyana (Pakistan in present). Subsequently, the king invited the yogi master Guru Padmasambhava who was rebirth of third son and he subdued all the Bon demons and converted them to the protector of buddhism. It is said that during the reign of the King Trisong Detsen, there was a Minister known as Selnang who was rebirth of the fourth son and he helped the king to invite both scholar Shantarakshita and Guru Padmasambhava to Tibet. Buddhism was strongly institutionalised  during the reign of King Trisong Detsen in Tibet and his three successors had somehow adopted Buddhism as their official religion but during the reign of his fourth successor referred as Emperor Langdarma became a follower of Bon religion. The Langdarma who is rebirth of Elephant is held to have killed his predecessor Ralpacan and enthroned himself as a emperor of Tibet. During his reign it is said that bhuddhist monks are persecuted and religious texts are burnt down thus losing the many spiritual texts and one of the buddhist prominent astrological texts (Tibetean Tse). Later, the buddhist hermit Lhalung Pelgye Dorje rebirth of a crow who was once abbot of Samye monastery was said to have gained supernatural powers like walking through rocks, flying etc. On hearing the persecution of buddhist by the king Langdarma, he came to the emperor’s threshold and performed mask dances attracting the audience. The curiosity aroused king Langdarma to witness the dance whereby the great Lhalung Pelgye Dorji assassinated the emperor Langdarma with an arrow and fled riding on a horse. It is said that he then retrieved religious text and it is because of him the Ningma Religion still exists in the world.

Sunday, August 5, 2018

Arduino Basic Tutorials

What is Arduino?
It is an open source programmable circuit that can be integrated into a wide variety of project including both simple and complex.
It is a programmable microcontroller that exactly gives a visual understanding of what your program does after uploading a program onto the board.






Introduced back in 2005 in Italy by Massimo Banzi.

Arduino Uno Board:

1. Reset Button: To restart any programs.

2. AREF: Analog reference and is used to set an external reference voltage.

3. Ground Pins.

4. Digital pins: Pin through 1-13 is digital input and output pins.



5. PVM (Pulse width Modulation): The pins marked with ~(tilde) signs can simulate an analogue output.

6. USB: used for powering the board and uploading the sketches.

7. TX/RX: Transmit and receive data indication LEDs.

8.  ATmega Controller: brain and stores the programs

9. Power LED indicators: The LED lights up when the power is on.

10. Power Regulators: Controls amount of power or voltages.

11.  Analogue Pins: Can read the analogue signals and convert to digital signals.

      Remark: Analogue is infinite values
                     Digital is discrete values.

Note: Arduino Needs 9Volt power Supply and if your Arduino needs to be mobile then it can be powered via USB cable.

       Remark: AC (Alternating current) where the direction of electric charge changes periodically.                            While DC (Direct Current) where the electric charge flows in one current.


Understanding Breadboard

It is an electric circuit where you can prototype projects.
Normally top and bottom two rows are connected horizontally and while others are connected vertically.

It is mandatory to have basic knowledge about electrical wiring to carry out projects in Arduino.






Prerequisites for Arduino:

Electrical Knowledge
Programming skills.

Enjoy Learning! Stay tuned for next updates!








Monday, March 21, 2016

Sometime our wrong choices bring us in right places


It requires hard work, little bit of scarifies, little bit of passion and few corporations to have something pleasant of work we just did. People seldom appreciate for above mentioned qualities that we managed but at the end of the day even if we came across a man appreciating for what we did, gives us a total satisfaction for our accomplishment. Working hard despite my health taking toll on me is now becoming hardest habit that I have ever felt.

Thursday, January 14, 2016

Unemployment In Bhutan

                                  Bhutan Tomorrow


The predator ‘unemployment’ has conquer the soul of many graduates of Bhutan, some commit suicide and some are victimized by drugs, perhaps Bhutanese are weak to face the reality. There are many steps Bhutan should undergo to attain self-reliance so as the nation aims at.

Technologies has boost in a country and brought noticeable development under selfless monarchs. Democracy had germinated from the golden throne of monarch, trusting his subject and it is our responsibility not to let his majesty down with our failure. Bhutan should not be the host of any problem but the solution to every terrible thing happening in a nation.

Sunday, January 3, 2016

Happy New Year



“A good beginning makes a good end”   -English Proverb


A new is year is all about afresh beginning with new dreams and determination. Let last year be the failure or success but time has come for us to move on with our life with new target if last year had been devastating failure and if last year had been your success, then it’s time to move on with the steps ahead of last year. But for me it was neither success nor failure so I can make this year either my failure to learn the lesson or success to be better man in the society. Yesterday was 2015 but morning dew brought us a new year 2016 with new hope to all the sentient being.


Being happy all time for all of us is mere dream, but then I could see in the envelope of 2016, as I unfold on Jan 1st, weather was perfect, birds are singing, people are dancing with their extreme excitement till dawn, significantly this year going to be gentle to us. I wish you happy new year to all.


"Tomorrow, is the first blank page of a 365 page book. Write a good one.” ― Brad Paisley

How to clone MAC address in TPLink Routers

  Prerequisites: Connect your computer through wireless/wired connection Note the mac addresses of the device that you want to allow or deny...