Back in the past, people used to believe that the gods live in the tree trunks, so by touching them they get blessed.
Hope this amendment to this answer from another helps
The phrase used by people who rap their knuckles on a piece of wood hoping to stave off bad luck. In the UK the phrase 'touch wood' is used - often jokingly by tapping one's head. The phrases are usually used when one is already experiencing some good fortune and hope that it will continue - e.g. "I've been winning on every race - touch wood".
The derivation may be the association that wood and trees have with good spirits in mythology, or with the Christian cross. It used to be considered good luck to tap trees to let the wood spirits within know you were there. Traditions of this sort still persist in Ireland. See also - the darling buds of May.
The British version - touch wood, had an earlier Latin version used when touching wood - absit omen!, meaning 'far be that omen from us'. This dates from at least the early 17th century, when it is quoted by Heywood. It isn't clear when touch wood began to be used. It must have been well-known by 1849, when The Boy's Own Book published the rules of a children's game that derived from the phrase:
"This game is sometimes called 'Touch-iron' or 'Touch-wood'; in these cases the players are safe only while they touch iron or wood, as may be previously agreed. They are liable to be touched only when running from one piece of wood or iron to another."
Knock on wood - the American version, is known from the early 20th century. For example, The Indianapolis Star, September 1908:
The term is Hack-A-Shaq.
A cryptoanalysts...code breakers decipher codes and encryptions using math stastics and brute force. Often obtaining keys, cyphers or code basic from forcing errors, repitition or using analysis of the root language to identify patterns
It means getting whooped, obliterated or owned.
It means "kind of" or "sort of" - "approximately"