Minha sogra que pediu pra fazer uma tirinha pra ela (não sei se foi uma boa ideia fazer justo numa segunda).
O post Sem medo do perigo (ou quase). apareceu primeiro em Mentirinhas.
Minha sogra que pediu pra fazer uma tirinha pra ela (não sei se foi uma boa ideia fazer justo numa segunda).
O post Sem medo do perigo (ou quase). apareceu primeiro em Mentirinhas.
Tá pensando que é igual a bicho de estimação que pode largar 3 dias sem comida e sem amÔ?!
O post Mentirinhas #706 apareceu primeiro em Mentirinhas.
A pencil-and-paper round of SHA-256
A cryptographic hash function takes a block of input data and creates a smaller, unpredictable output. The hash function is designed so there's no "short cut" to get the desired output - you just have to keep hashing blocks until you find one by brute force that works. For Bitcoin, the hash function is a function called SHA-256. To provide additional security, Bitcoin applies the SHA-256 function twice, a process known as double-SHA-256.
In Bitcoin, a successful hash is one that starts with enough zeros.[1] Just as it is rare to find a phone number or license plate ending in multiple zeros, it is rare to find a hash starting with multiple zeros. But Bitcoin is exponentially harder. Currently, a successful hash must start with approximately 17 zeros, so only one out of 1.4x1020 hashes will be successful. In other words, finding a successful hash is harder than finding a particular grain of sand out of all the grains of sand on Earth.
The following diagram shows a block in the Bitcoin blockchain along with its hash. The yellow bytes are hashed to generate the block hash. In this case, the resulting hash starts with enough zeros so mining was successful. However, the hash will almost always be unsuccessful. In that case, the miner changes the nonce value or other block contents and tries again.
Structure of a Bitcoin block
The blue boxes mix up the values in non-linear ways that are hard to analyze cryptographically. Since the algorithm uses several different functions, discovering an attack is harder. (If you could figure out a mathematical shortcut to generate successful hashes, you could take over Bitcoin mining.)
The Ma majority box looks at the bits of A, B, and C. For each position, if the majority of the bits are 0, it outputs 0. Otherwise it outputs 1. That is, for each position in A, B, and C, look at the number of 1 bits. If it is zero or one, output 0. If it is two or three, output 1.
The Σ0 box rotates the bits of A to form three rotated versions, and then sums them together modulo 2. In other words, if the number of 1 bits is odd, the sum is 1; otherwise, it is 0. The three values in the sum are A rotated right by 2 bits, 13 bits, and 22 bits.
The Ch "choose" box chooses output bits based on the value of input E. If a bit of E is 1, the output bit is the corresponding bit of F. If a bit of E is 0, the output bit is the corresponding bit of G. In this way, the bits of F and G are shuffled together based on the value of E.
The next box Σ1 rotates and sums the bits of E, similar to Σ0 except the shifts are 6, 11, and 25 bits.
The red boxes perform 32-bit addition, generating new values for A and E. The input Wt is based on the input data, slightly processed. (This is where the input block gets fed into the algorithm.) The input Kt is a constant defined for each round.[2]
As can be seen from the diagram above, only A and E are changed in a round. The other values pass through unchanged, with the old A value becoming the new B value, the old B value becoming the new C value and so forth. Although each round of SHA-256 doesn't change the data much, after 64 rounds the input data will be completely scrambled.[3]
To explain what's on the paper: I've written each block A through H in hex on a separate row and put the binary value below. The maj operation appears below C, and the shifts and Σ0 appear above row A. Likewise, the choose operation appears below G, and the shifts and Σ1 above E. In the lower right, a bunch of terms are added together, corresponding to the first three red sum boxes. In the upper right, this sum is used to generate the new A value, and in the middle right, this sum is used to generate the new E value. These steps all correspond to the diagram and discussion above.
I also manually performed another hash round, the last round to finish hashing the Bitcoin block. In the image below, the hash result is highlighted in yellow. The zeroes in this hash show that it is a successful hash. Note that the zeroes are at the end of the hash. The reason is that Bitcoin inconveniently reverses all the bytes generated by SHA-256.[4]
Last pencil-and-paper round of SHA-256, showing a successfully-mined Bitcoin block.
In contrast, Litecoin, Dogecoin, and similar altcoins use the scrypt hash algorithm, which is intentionally designed to be difficult to implement in hardware. It stores 1024 different hash values into memory, and then combines them in unpredictable ways to get the final result. As a result, much more circuitry and memory is required for scrypt than for SHA-256 hashes. You can see the impact by looking at mining hardware, which is thousands of times slower for scrypt (Litecoin, etc) than for SHA-256 (Bitcoin).
A Reddit reader asked about my energy consumption. There's not much physical exertion, so assuming a resting metabolic rate of 1500kcal/day, manual hashing works out to almost 10 megajoules/hash. A typical energy consumption for mining hardware is 1000 megahashes/joule. So I'm less energy efficient by a factor of 10^16, or 10 quadrillion. The next question is the energy cost. A cheap source of food energy is donuts at $0.23 for 200 kcalories. Electricity here is $0.15/kilowatt-hour, which is cheaper by a factor of 6.7 - closer than I expected. Thus my energy cost per hash is about 67 quadrillion times that of mining hardware. It's clear I'm not going to make my fortune off manual mining, and I haven't even included the cost of all the paper and pencils I'll need.
[2] The source of the constants used in SHA-256 is interesting. The NSA designed the SHA-256 algorithm and picked the values for these constants, so how do you know they didn't pick special values that let them break the hash? To avoid suspicion, the initial hash values come from the square roots of the first 8 primes, and the Kt values come from the cube roots of the first 64 primes. Since these constants come from a simple formula, you can trust that the NSA didn't do anything shady (at least with the constants).
[3] Unfortunately the SHA-256 hash works on a block of 512 bits, but the Bitcoin block header is more than 512 bits. Thus, a second set of 64 SHA-256 hash rounds is required on the second half of the Bitcoin block. Next, Bitcoin uses double-SHA-256, so a second application of SHA-256 (64 rounds) is done to the result. Adding this up, hashing an arbitrary Bitcoin block takes 192 rounds in total. However there is a shortcut. Mining involves hashing the same block over and over, just changing the nonce which appears in the second half of the block. Thus, mining can reuse the result of hashing the first 512 bits, and hashing a Bitcoin block typically only requires 128 rounds.
[4] Obviously I didn't just have incredible good fortune to end up with a successful hash. I started the hashing process with a block that had already been successfully mined. In particular I used the one displayed earlier in this article, #286819.
[5] Another problem with manual mining is new blocks are mined about every 10 minutes, so even if I did succeed in mining a block, it would be totally obsolete (orphaned) by the time I finished.
Sugestão de Lucas Victor
The post Joselito na infância (7) – na aula de inglês appeared first on DrPepper.com.br.

11 jogadores de um mesmo time de futebol morreram fulminados por um raio durante a partida que disputavam num povoado no centro da República Democrática do Congo.
Veja aqui a matéria.
A morte do Orkut deixou desolados milhões de brasileiros de mau gosto que terão saudades daquelas páginas confusas e feias. Enquanto alguns choram, as autoridades buscam as reais razões da morte da comunidade virtual. Fontes importantes apontam o Facebook como assassino, como o Sensacionalista já noticiou. Mas há quem diga que se trata do primeiro caso confirmado de Ebola na internet. Outros afirmam que o Orkut foi decapitado pelo ISIS.
As autoridades temem agora que as urnas eletrônicas também morram. “Afinal, são duas coisas que fazem sucesso apenas entre brasileiros”, diz o delegado Rodrigo Scrap, que conduz o caso.
Desiree Aparecida e L. Lanna
O Iphone 6 Plus, apesar do tamanho, é o mais discreto do mercado. O novo aparelho da Apple, que é dobrável, vem sendo o mais procurado por bandidos que querem entrar com celulares nos presídios. O iPhone trouxe novos aplicativos que facilitam a vida dos marginais. Entre os apps mais populares está aquela que clona impressões digitais e engana a biometria de agências bancárias.
A Apple anunciou que em breve vai lançar um mini iPHone que pode ser escondido em qualquer parte do corpo. Presidiários já estão especulando para saber quem vai entrar com o iphone mini e onde. Os novatos são os principais candidatos.
L. Lanna e Otileno Junior
Vale tudo na reta final da campanha. O cantor Mick Jagger também já declarou que vai votar na candidata. Marina deve mudar seu jingle para uma versão de “Cai cai balão”. Dilma já começa a pensar em tentar liquidar a fatura no primeiro turno. Até porque para conseguir um segundo turno com a Dilma tem que ser guerreiro. Guerreiro do povo brasileiro.
O tucano Aécio Neves está animado. Amigos dizem que ele está mostrando que sua carreira política não virou pó. Agora para conseguir uma vaga no segundo turno Aécio deve lutar pelos votos em branco.
Emily Wax-Thibodeaux reports:
The new supervisor thought his idea was innocent enough. He wanted the baristas to write the names of customers on their cups to speed up lines and ease confusion, just like other Starbucks do around the world.
But these aren’t just any customers. They are regulars at the CIA Starbucks.
“They could use the alias ‘Polly-O string cheese’ for all I care,” said a food services supervisor at the Central Intelligence Agency, asking that his identity remain unpublished for security reasons. “But giving any name at all was making people — you know, the undercover agents — feel very uncomfortable. It just didn’t work for this location.”
This purveyor of skinny lattes and double cappuccinos is deep inside the agency’s forested Langley, Va., compound.
…The baristas go through rigorous interviews and background checks and need to be escorted by agency “minders” to leave their work area. There are no frequent-customer award cards, because officials fear the data stored on the cards could be mined by marketers and fall into the wrong hands, outing secret agents.
And this:
The chief of the team that helped find Osama Bin Laden, for instance, recruited a key deputy for the effort at the Starbucks, said another officer who could not be named.
Employees at the branch also are not allowed to bring smart phones inside. The piece is interesting throughout.

That moment when a strawberry has a more toned butt than yours. #9gag

Damn kids today never off their phones. #9gag