[-] Markaos@lemmy.one 4 points 19 hours ago
def generate_proof_of_work_key(initial_key, time_seconds):
    proof_key = initial_key
    end_time = time.time() + time_seconds
    iterations = 0
    while time.time() < end_time:
        proof_key = scrypt(proof_key, salt=b'', N=SCRYPT_N, r=SCRYPT_R, p=SCRYPT_P, key_len=SCRYPT_KEY_LEN)
        iterations += 1
    print(f"Proof-of-work iterations (save this): {iterations}")
    return proof_key


def generate_proof_of_work_key_decrypt(initial_key, iterations):
    proof_key = initial_key
    for _ in range(iterations):
        proof_key = scrypt(proof_key, salt=b'', N=SCRYPT_N, r=SCRYPT_R, p=SCRYPT_P, key_len=SCRYPT_KEY_LEN)
    return proof_key

The first function is used during the encryption process, and the while loop clearly runs until the specified time duration has elapsed. So encryption would take 5 days no matter how fast your computer is, and to decrypt it, you'd have to do the same number of iterations your computer managed to do in that time. So if you do the decryption on the same computer, you should get a similar time, but if you use a different computer that is faster at doing these operations, it will decrypt it faster.

[-] Markaos@lemmy.one 5 points 19 hours ago

It's a very short Python script and I'm confident I get the general idea - there's absolutely nothing related to current time in the decryption process. What they refer to as a "time lock" is just encrypting the key in a loop (so the encrypted key from one loop becomes the plain text for the next one) for the specified duration and then telling you how many iterations were done. That number then becomes a second part of the password - to decrypt, you simply provide the password and the number of iterations, nothing else matters.

[-] Markaos@lemmy.one 14 points 2 days ago

Yeah, even the TLDR makes it sound more like Qualcomm is yielding to the pressure from OEMs who want to be able to offer longer updates

[-] Markaos@lemmy.one 18 points 3 weeks ago

Convenience (after you install it, all you have to do is enter the code and you're connected, no other setup required), familiarity (it's the default name people will think of or find if they want remote access - that alone means they can get away with pushing their users slightly more) and - IMHO most importantly - connectivity: if two computers can connect to the TeamViewer servers, they will be able to connect to each other.

That's huge in the world of broken Internet where peer to peer networking feels like rocket science - pretty much every consumer device will be sitting behind a NAT, which means "just connecting" is not possible. You can set up port forwarding (either manually or automatically using UPnP, which is its own bag of problems), or you can use IPv6 (which appears to be currently available to roughly 40% users globally; to use it, both sides need to have functional IPv6), or you can try various NAT traversal techniques (which only work with certain kinds of NAT and always require a coordinating server to pull off - this is one of the functions provided by TeamViewer servers). Oh, and if you're behind CGNAT (a kind of NAT used by internet providers; apparently it's moderately common), then neither port forwarding or NAT traversal are possible. So if both sides are behind CGNAT and at least one doesn't have IPv6, establishing a direct link is impossible.

With a relay server (like TeamViewer provides), you don't have to worry about being unable to connect - it will try to get you a direct link, but if that fails, it will just act as a tunnel and pass the data between both devices.

Sure, you can self host all this, but that takes time and effort to do right. And if your ISP happens to use CGNAT, that means renting a VPS because you can't host it at home. With TeamViewer, you're paying for someone else to worry about all that (and pay for the servers that coordinate NAT traversal and relay data, and their internet bandwidth, neither of which is free).

[-] Markaos@lemmy.one 40 points 4 weeks ago* (last edited 4 weeks ago)

If it is an Arch-based distro (sorry, I don't recognize the package manager), then this might just be the recent Wine update that made it 700 MB smaller (which would mean the rest of your system grew 300 MB)

I made a post here about it: this one

Btw, is there a way to link to a post in a way that resolves on everyone's separate instance instead of hard coding it to my instance?

[-] Markaos@lemmy.one 20 points 4 weeks ago* (last edited 4 weeks ago)

I don't really see the big problem here? Like sure, it's silly that it's cheaper to make wireless headphones than wired ones (I assume - the manufacturers are clearly not too bothered by trademarks and stuff if they put the Lightning logo on it so they wouldn't avoid wired solution just due to licensing fees), but what business does Apple have in cracking down on this? Other than the obvious issues with trademarks, but those would be present even if it were true wired earphones. It's just a knockoff manufacturer.

Cheapest possible wired earphones won't sound much better than the cheapest possible wireless ones, so sound quality probably isn't a factor. And on the plus side, you don't have multiple batteries to worry about, or you could do something funny, like plugging the earphones into a powerbank in your pocket and have a freak "hybrid" earphones with multi-day battery (they're not wireless, but also not tethered to your phone). On the other side, you do waste some power on the wireless link, which is not good for the environment in the long run (the batteries involved will see marginally more wear)

Honestly the biggest issue in my mind is forcing people to turn on Bluetooth, but I don't think this will change anyone's habits - people who don't know what Bluetooth is will definitely just leave it on anyway (it's the default state), and people technical enough to want to turn it off will recognize that there's something fishy about these earphones.

35
submitted 1 month ago by Markaos@lemmy.one to c/archlinux@lemmy.ml

Not complaining, just wondering - I was upgrading my system and noticed that the net upgrade size is -748 MB, with just a few important-looking packages set to be upgraded. So I checked and it's wine - going from 1338 MB (9.9-1) to just 587 MB (9.9-2).

I checked the commits to the package repo, and as far as I can tell, this is the only change between 9.9-1 and 9.9-2 - it removes a bunch of hardening flags and that's it. I know these often come at the price of increasing the final build size, but more than double?

For context, the Arch-wide flags are defined here, if I understand it correctly

[-] Markaos@lemmy.one 19 points 1 month ago

I mean, it's called "LaTeX by example", so there's a pretty good chance it's written in LaTeX, which you do indeed compile to get the PDF or whatever output you want.

Also, just having access to the source doesn't make it open source - that requires more freedoms. For example, here's GitLab Enterprise Edition source code, fully functional and ready to be used. And also officially described as the proprietary edition of GitLab by the GitLab company itself. Why? Because its license pretty much boils down to "you can use this only for testing and development, unless you have paid for it".

[-] Markaos@lemmy.one 22 points 2 months ago

I don't think that's a similar situation - the Linux kernel lost some functionality there, but in this case Ext2 filesystems are still fully supported by the Ext4 driver, so there's no difference in "hardware" support.

The separate Ext2 driver was being kept for embedded devices with extreme memory or storage limitations where saving some kilobytes by not having all the new Ext3/4 features was useful, but when you can afford the extra memory, there's no reason not to just use the Ext4 driver for all Ext2/3/4 filesystems.

[-] Markaos@lemmy.one 44 points 3 months ago

Does UEFI initialize all the cores? I know the OS always starts with only one core available, but I'm not sure if UEFI just disables the cores after it's done its thing, or if it doesn't touch them. Because if it stays on core 0 and never even brings the other ones up, then this issue with core 2 could let it boot this far just fine.

31
submitted 5 months ago by Markaos@lemmy.one to c/googlepixel@lemmy.world
[-] Markaos@lemmy.one 21 points 7 months ago

Generally yes. The Fn key is usually handled either by the keyboard itself or by the BIOS, and the OS just sees the resulting key presses as if the keyboard had all the buttons. Can you not find such a switch in your BIOS? Saying what vendor it is might also help someone help you.

60
submitted 8 months ago by Markaos@lemmy.one to c/googlepixel@lemmy.world

Sure, this is very light usage - just 5 hours SoT over more than 2 days of usage - but I couldn't get this phone to even make it to two days with similar usage on Android 13. And it's comparable to my previous budget phone, so the only thing the 7a was worse at is now fixed for me.

163
submitted 9 months ago by Markaos@lemmy.one to c/googlepixel@lemmy.world
[-] Markaos@lemmy.one 22 points 10 months ago

They would have to sign another contract for another 24 months to get it, nobody was getting an upgrade on the existing contract because it's just a bundle of Google services (One, YT Premium etc.) and financing on the phone. And if you don't care about the services, Google's two year financing is cheaper than this bundle.

237
Lying in grass (lemmy.one)
submitted 10 months ago by Markaos@lemmy.one to c/cat@lemmy.world
429
submitted 10 months ago by Markaos@lemmy.one to c/cat@lemmy.world
221
submitted 10 months ago by Markaos@lemmy.one to c/pics@lemmy.world
211
submitted 10 months ago by Markaos@lemmy.one to c/aww@lemmy.ml
[-] Markaos@lemmy.one 26 points 10 months ago

From this point of view is systemd disaster because it is almost everywhere in the system - boot, network, logs, dns, user/home management…

That's almost like complaining that GNU coreutils is a disaster from KISS point of view because it includes too many things in a single project - cat, grep, dd, chown, touch, sync, base64, date, env... Not quite, because coreutils is actually a single package unlike systemd.

The core systemd is big (IMHO it needs to be in order to provide good service management, and service management is a reasonable thing to include in systemd), but everything you listed are optional components. If your distro bundles them into one package, that's on them.

76
submitted 10 months ago by Markaos@lemmy.one to c/googlepixel@lemmy.world
view more: next ›

Markaos

joined 1 year ago