Wikipedia:Reference desk/Archives/Computing/2017 July 7

= July 7 =

Java: optimization out of zero/false/null initialization
Under what circumstances will modern Java compilers optimize out the assignment of zero, false or null to a previously uninitialized field (and not rely on the runtime compilation to do so)? Neon Merlin  01:26, 7 July 2017 (UTC)

Virtual Private Network in Russian hacking of election
Hi, a friend of mine who is getting an undergraduate degree in computer science, told me that it doesn't make sense that the NSA and 16 other US intelligence agencies could be as sure as they claim, that the Russians were behind the hacking, because whoever did it would surely use VPNs to hide where they came from, and VPNs can't be broken(I know there is also linguistic evidence, but that could have been faked to frame the Russians). Is my friend correct about the VPNs or is there some way around it, or does the NSA etc have other computer science methods of finding out where things came from? My friend says the claim in the media, and the claim by James Comey, that the intelligence agencies are so sure about the hacking, must not be true. Thanks! 144.35.114.222 (talk) 14:42, 7 July 2017 (UTC)
 * You are friend is probably not a very good student because they are confused about what VPNs really do and how they can be "broken". Ruslik_ Zero 20:56, 7 July 2017 (UTC)
 * That's unprofessional and uninformative.144.35.114.198 (talk) 21:38, 7 July 2017 (UTC)
 * It's not uncommon to use VPNs in ways which can be broken. But the intelligence agencies are going to be using much more than the IP address of the attacker, for example traffic analysis and more human sources. Plus, spooks probably have good inside access to some of the VPN providers anyway ;) -- zzuuzz (talk) 22:05, 7 July 2017 (UTC)


 * Attribution of computer attacks is notoriously difficult. (A good way to learn about this kind of things is to follow Bruce Schneier's blog.) But it usually has little to do with breaking VPNs.
 * Command and control is an old problem for botnet attackers: infected computers in a large botnet cannot realistically fixed by users or cut off the grid by ISPs, but the attacker needs to be able to give orders to the botnet otherwise it will stay dormant. "Professional" attackers (security agencies, organized crime) will use a staging server to avoid (among other things) to expose their IP (EternalBlue / WannaCry was probably stolen from such a server). The origin-obfuscation tools used are much more complex than a simple VPN.
 * However, once the attack is launched and does enough damage, analysts have virtually infinite time and resources to obtain a sample of the virus, reverse-engineer and analyze it; whereas the attackers, even with a large budget, are usually on a schedule to deliver the attack when the boss wants it or before the vulnerability gets patched (for instance, WannaCry made much less damage than it should have because the sandbox detection module was stupid). This usually results in some missteps.
 * Note that "linguistic evidence" does not just mean Russian comments in source code. For instance, the "Macron leaks" were attributed to Russian hackers (not necessarily Russian government) due to Windows Excel file metadata. In another case that I cannot remember, hours of activity of a botnet command channel was found to coincide with Moscow 9-5 business hours. All of those can be forged by a sufficiently meticulous opponent ready to work during the night, but Hanlon's razor usually applies. Tigraan Click here to contact me 12:20, 10 July 2017 (UTC)

.apk
I require a ruler which, I wish to move the interface in order to measure item(s), not the actual Smart Phone.

Currently possessing this and this. 116.58.202.234 (talk) 14:53, 7 July 2017 (UTC)

Amount of information
Does the chain 0000 0000 has the same amount of information as 0101 1010? That is 8 bits/1 byte? At least they occupy the same space. What about the expression 'a string of 1 million 0s' and the string proper (that is, 1,000,000 * 0s). do they also have the same amount of information?--Hofhof (talk) 18:42, 7 July 2017 (UTC)


 * You're mixing two different definitions of "space." In your first example, both 00000000 and 01010101 are the same size (8 bits) so they also share the same amount of space. Your second example is using the word "space" as a means to describe the actual information that you are receiving from the information in front of you. With both examples, the person reading the information will understand that it's the same number, but the representations of these numbers take up different amounts of physical space in a computer's memory. The first string given is comprised of characters which generally take up 1 byte each (8 bits). So your string would take up 192 bits. The string "1,000,000,000,000...." would take up over 8 millions bits (8 million for bits for the million zeros, then add 8 more bits for every comma and the 1.) 129.55.200.20 (talk) 19:14, 7 July 2017 (UTC)


 * You are getting into information theory. In doing so, you get into implied information. 00000000 could imply a lack of information. It could imply a specific item of information. Without a discussion of the information realm, we don't know the implication and, therefore, cannot make complete statements about the information contained in the string of characters. A better example is a file compression format. ABABABAB contains information. AB{4} implies the same information with less space. However, that requires knowledge that {X} means "repeat the previous characters X times." If you didn't have knowledge of the meaning behind {X}, the two strings of characters wouldn't contain the same information. 209.149.113.5 (talk) 19:56, 7 July 2017 (UTC)
 * Suggested reading: Information. The information encoded in one "fair" coin flip is 1 Bit. The information encoded in one byte is 8 bits; this is the minimum memory space needed to store a given byte value. Equivalently, an 8-bit memory space can have 28 = 256 possible values. 0000 0000 and 0101 1010 are understood to be byte values expressed in pairs of Nibbles. They might be expressed more compactly in Hexadecimal as 00h and 5Ah respectively. The OP's word "chain" is unclear. If it means a chain of any number n of printed characters then the information space is (bits per alphanumeric character)n which can be very large if many Fonts are allowed. The ASCII standard encodes characters using 7 or 8 bits per character, which gives no font control and is not a memory-efficient way to specify the state of a single bit. The expression of 24 alphanumeric characters 'a string of 1 million 0s' occupies 24 x 8 = 192 storage bits in 8-bit ASCII. A literal 1,000,000-bit binary number needs minimum 1,000,000-bit storage space. Other uncompressed ways of storing the number, such as the characters of the number expressed in decimal, can occupy much more space in bits. However some preknowledge of the number's significance may allow a compression scheme that reduces its memory space, for example a floating-point representation of the number may be stored if it has the required resolution. Blooteuth (talk) 21:36, 7 July 2017 (UTC)
 * Also see Kolmogorov complexity, which handles the situation that from a Shannon point of view, the string 01101101 (from an unbiased bit source) contains the amount of information as 01010101 or 00001111 or 11111111, while intuitively we think the later ones are "simpler". --Stephan Schulz (talk) 12:49, 10 July 2017 (UTC)