News for hackers. Stuff that matters.

zeroimpl

The “security” of an algorithm is not defined as the duration of time required by a computer to brute force it. Much more important is how safe it is against other known or anticipated attacks.
And if your app has any kind of online component, there's probably an HTTP request hitting your server whenever the user launches the app. So even without explicit telemetry in the app, you can easily get decent data from your web server's logs.
You can do that all online with most cards. It's also likely extremely rare that your card number is stolen this way (it's never happened to me as far as I'm aware).
I look it at the opposite. As a user, the only thing Paypal protects is your credit card info. Your personal information (name and address) gets passed on to the merchant regardless. There's zero risk to us consumers for stolen credit card numbers, so why would I care about that? Instead, Paypal costs more for the merchants, and I'd prefer the merchant stays in business so I'll use their preferred payment system. Plus, why do I want Paypal keeping their own record of everything I purchase? Thus I only use Paypal when there are no other options.
Re:Why does APT not use HTTPS? on Monday January 21, 2019 @10:04AM (#18960793)
But it does, because HTTPS can ensure you always get up to date data. They have a solution involving timestamps for HTTP, but that is still clearly less secure than the guarantee from HTTPS.
Re:Why does APT not use HTTPS? on Monday January 21, 2019 @08:40AM (#18960286)
They could also improve the download client to fix this.

For example, if the download client uses the byte-range HTTP requests to download files in chunks, there is nothing stopping it from randomly requesting some additional bytes from the server. Then the attacker would have a very weak probability estimate of what was actually downloaded.

Re:9999999999999999.0 – 9999999999999998.0 on Sunday January 06, 2019 @07:30PM (#18841759)
In PostgreSQL, if you specify a decimal literal, it is assumed to be type NUMERIC (arbitrary precision) by default, as opposed to FLOAT or DOUBLE PRECISION.

If you stored your values in table rows as DOUBLE PRECISION, you would of course get the wrong answer.

The string representation is for display purposes/information exchange only. I'm sure most implementations would internally store the data in a 16-byte form (eg the C implementation uses __uint128_t), where the data is essentially a 128-bit number.

Given that, inventing a new character set seems pointless, since you'd compare the data using 128-bit binary operations already anyways (as opposed to lexicographical string comparisons). Which leads to the question - how is ULID different from UUID in practice?

Re:Please do not attempt to simplify this code on Thursday December 27, 2018 @07:53PM (#18774009)
I think this commenting only makes sense if the design is atypical. Probably 90% of the code I write is following design patterns already used throughout the code base.
Re:A well-known URL for changing passwords on Saturday December 08, 2018 @11:51PM (#18639381)
Changing your password for a google account seems to involve going to myaccount.google.com (which is not the domain your login is associated with) - so clearly this needs to support redirects to different subdomains.
Re:Firefox 63 – Tricks and Treats on Tuesday October 23, 2018 @11:17PM (#18289430)
Not everybody agrees on the best way to draw text (some people like it blurry, others like it higher contrast), so I think the target users may matter to some level. It also varies by OS, and the OS even have options to let users influence it in some way.

Have you also noticed how even color rendering varies by browser? This is less intuitive...

Re:PgFormatter: A PostgreSQL SQL syntax beautifier on Wednesday October 10, 2018 @07:03PM (#18189708)
I tried your SQL in the demo, and it came out like this:

    SELECT
        field,
        other_field
    FROM
        TABLE
    WHERE
        some_thing IN (
            SELECT
                id
            FROM
                other_table)
            AND other_field IS NOT NULL
I'd have expected the last line to have one less indentation level...
Agreed. Having to support both the iPhone SE and the iPhone X aspect ratio is really difficult since they are on opposite extremes. I'm quite pleased with the removal of this size configuration - hopefully in about 2 years we won't need to keep supporting it.
Thanks. I didn't read it carefully enough the first time but I see that mentioned now.
Did the mice which had access to food 24/7 eat more overall than the mice with restricted food access?

If so, then the study seems useless because the results can entirely be explained as excessive eating leads to health problems.

I don't see anything in the article saying how they controlled for quantity of food consumed.

Re:Mod and remainder are not the same on Thursday August 23, 2018 @10:32AM (#17827574)
I recalling seeing these referred to as modp (positive) and mods (symmetric) back in University. This seems to be the clearest way to distinguish them. I didn't realize different popular programming languages used different versions for the % operator...

The case of a negative denominator doesn't seem to make sense when talking about modulo in an algebraic sense. I don't think you can have a Ring with a negative dimension. So I've never even thought about what % would do with a negative denominator (RHS). If I was using % with an unknown denominator as input, I could just as easily end up with it being 0 which would be a bad thing, so I think it's fair to say I always require it to be positive.

Right - would be great if more languages supported that, specifically Javascript.
This suggests the only safe portable way to represent hex is one of these? [1234567890abcdefABCDEF] or [\dabcdefABCDEF] That sucks. Fortunately I don't use C, but I'm worried about this finding its way into other languages...
Re:Itty Bitty: Sites contained within their own links on Wednesday July 04, 2018 @11:18PM (#17460647)
The base HTML/javascript coming from the itty.bitty server does not make it smaller. As a matter of fact, it appears that the javascript provided by itty.bitty simply decompresses the URL fragment and then converts it into a data-URI and passes that to an iframe.

So it is smaller than a data URI - but only because it is compressed.

Re:Safe ways to do things in bash on Monday May 14, 2018 @08:29PM (#17070644)
You just add quotes around $dir. Bash understands the quotes properly/recursively.

    parent_dir = "$(basename "$dir")"
While this syntax looks decent to me, I'm curious why they didn't go with a heredoc approach, e.g.:

    String s = <<<TEXT
    <html> 
        <body>
            contents
        </body>
    </html>
    TEXT
Yes unless the websites are using a CDN with shared IP addresses. I wonder what % of the web that covers nowadays.
Re:User-defined Order in SQL on Wednesday March 21, 2018 @10:36PM (#16645166)
Nope but I will next time. This is quite clever. It's likely equivalent to using arbitrary precision numbers but probably performs a lot better.
Re:User-defined Order in SQL on Wednesday March 21, 2018 @09:42AM (#16637880)
I've run into this problem when keeping a single large (100000+) list sorted. In my case it was very important not to change the sort value on rows that didn't need to.

I had considered most of the solutions listed in the article except for the true fraction method. I believe that solution was explored by the author as they thought floating points were somehow solving a problem that couldn't be solved by integers. I settled on an approach that is essentially Solution 2 but using integers instead, each time bisecting the other two integers. The important aspect is that when inserting at the head or tail of the list, you bisect between MININT (-2^63) or MAXINT (2^63-1) respectively.

Re:User-defined Order in SQL on Wednesday March 21, 2018 @09:31AM (#16637818)
As far as I can tell, there's really no advantage to using floating point/fractions at all. I've used an integer-based solution for this very problem in the past.

You can apply the same logic of finding the midpoint between two integers using very simple integer math, store the result as an integer, and get high performance. Just don't start by populating your list with small numbers, the first number would be 0 and the second one would be the midpoint between 0 and either MAXINT or MININT depending on if it came before or after. This ought to have all the advantages of approach 3 (True Fractions) with none of the disadvantages. I'd create a function integer_intermediate just like the rational_intermediate function documented in the article too.

The problem with floating points is that the available precision is highly variable. Sure you can bisect between 0 and 1 many times, but what about between 1000 and 1001? Those 10 bits are lost.

Re:AMP for email is a terrible idea on Tuesday February 13, 2018 @10:03PM (#16373084)
Seriously. Would be great if somebody could just declare a new mime-type such as "text/html5" that could be used to activate modern html rendering in email clients and would be shipped alongside the existing "text/html" and "text/plain" components. Eventually when enough email clients support this, we could stop generating the legacy html emails and only include text/html5 and text/plain mime types in emails.
Re:Issue with TLS-SNI-01 and Shared Hosting Infrastructure on Wednesday January 10, 2018 @07:59PM (#16120611)
You don't need to keep a master list of IP addresses up to date, you only have to test an IP when a request for a cert comes in from that IP.