2021 избори 2 в 1: разходите за политическа реклама

от Нели Огнянова
лиценз CC BY

Институтът за развитие на публичната среда  обяви резултатите от Мониторинг  на разходите за медийно отразяване. Наблюдението обхваща    40 национални и регионални медии  – 10 телевизии, 3 радиостанции, 13 вестника и 14 информационни сайта и агенции. Според Изборния кодекс договорите между партии и медии следва да се публикуват в тридневен срок от тяхното сключване и следва да се премахнат не по-рано от обявяване на изборния резултат. Изнасят се данни за най-търсените телевизии, политическите сили и кандидати с най-големи разходи и пр.

А Свободна Европа публикува данни за разходите за политическата реклама онлайн.

Според публикацията кандидатите за депутати, за президенти и за любимци на суверена са дали за реклама във Фейсбук около последните избори в България близо 1,3 милиона лева. Сумата от 673 922 евро е отбелязана в публичния регистър за политическа реклама в социалната мрежа за периода 15 август- 27 ноември 2021. Като самостоятелен рекламодател, коалицията “Продължаваме промяната” е отделила най-много пари за Фейсбук.

Програма Цифрова Европа: покани за представяне на предложения

от Нели Огнянова
лиценз CC BY

Комисията прие три работни програми за програмата „Цифрова Европа“, в които се очертават целите и конкретните тематични области, които ще получат финансиране в размер на общо 1,98 милиарда евро. Ще се подкрепят инициативи за постигането на целите на Комисията за   цифровото десетилетие на Европа.

Първите покани за представяне на предложения за програмата „Цифрова Европа“са публикувани на 17 ноември тук. Срок – 22 февруари 2022 г.

През 2022 г. ще бъдат публикувани още покани. Работните програми ще се изпълняват главно чрез безвъзмездни средства и обществени поръчки.

ЕСПЧ: Генов и Сърбинска срещу България

от Нели Огнянова
лиценз CC BY

На 30 ноември 2021 г. Европейският съд за правата на човека се произнесе по делото Генов и Сърбинска срещу България. След решението по делото Ханджийски срещу България   това е второто подобно решение, в което България е осъдена за нарушение на чл.10 във връзка с мерки срещу политическото слово, които не са необходими в едно демократично общество.

В предходното решение ЕСПЧ напомня известната си позиция, че   свободата на изразяване е приложима не само за „информация“ или „идеи“, които са приети благосклонно или неутрално, но и за онези, които обиждат, шокират или безпокоят държавата или определена общност.  „Може да се приеме, че символичният жест на жалбоподателя е нанесъл вреда на някои от хората, които са го били пряко свидетели или са научили за това от медиите. Свободата на изразяване обаче е приложима не само за „информация“ или „идеи“, които се приемат благосклонно или се считат за обидни или за безразличие, но и за тези, които обиждат, шокират или притесняват държавата или който и да е сектор от населението.“ [58]

10

Факти

Двамата кандидати, популярен блогър и политически активист, са признати за виновни за хулиганството и глобени за посегателство върху  паметник на  партизаните, разположен пред централата на БСП на Позитано,    в контекста на общонационалните протести срещу правителство,   подкрепяно от Българската социалистическа (бивша комунистическа) партия, доминиращата политическа сила по време на комунистическия режим в България. Жалбоподателите са обвинени в хулиганство. На първа инстанция са оправдани от съдия Мирослава Тодорова. Според решението, извършеното е в рамките на свободата на политическото слово. СГС осъжда жалбоподателите за хулиганство. Те подават иск за нарушение на чл.10 ЕКПЧ – делото се отнася до въпроса дали извършеното е  съвместимо с правата им по   чл. 10.

EСПЧ

Съдът прилага   теста за пропорционалност:

  • има намеса;
  • предвидена в закон;
  • преследва цели като запазване на културното наследство [69], но не и напр. защита на обществената безопасност, която не е била заплашена [71];
  • и се поставя въпросът дали изобщо е било  необходимо в едно демократично общество  да се санкционира актът на жалбоподателите.
  • Следва да се отбележи и в тази връзка, че паметникът е бил поставен по време на комунистическия режим в България  и е бил ясно свързан с ценностите и идеите, зад които е заставал този режим.  Първоинстанционният съд, разглеждащ делото срещу жалбоподателите, специално подчерта интензивните обществени дебати за наследството на режима и по-специално за съдбата на  паметниците. Не може да се пренебрегва факта, че законодателят на България е осъдил този режим като  престъпен  и официално е брандирал Българската комунистическата партия, която доминира  в страната през този режим, като  престъпна организация … за потискане на правата на човека и демократичната система. [83]
  • Намесата в правото на свобода на изразяване на жалбоподателите — констатацията, че са виновни за хулиганство, заедно с наложените  глоби в резултат — не е доказано “необходима в демократично общество” по смисъла на член 10 от Конвенцията.
  • Следователно е налице нарушение на чл. 10. [84]

Simple Things That Are Actually Hard: User Authentication

от Божидар Божанов
лиценз CC BY

You build a system. User authentication is the component that is always there, regardless of the functionality of the system. And by now it should be simple to implement it – just “drag” some ready-to-use authentication module, or configure it with some basic options (e.g. Spring Security), and you’re done.

Well, no. It’s the most obvious thing and yet it’s extremely complicated to get right. It’s not just login form -> check username/password -> set cookie. It has a lot of other things to think about:

  • Cookie security – how to make it so that a cookie doesn’t leak or can’t be forged. Should you even have a cookie, or use some stateless approach like JWT, use SameSite lax or strict?
  • Bind cookie to IP and logout user if IP changes?
  • Password requirements – minimum length, special characters? UI to help with selecting a password?
  • Storing passwords in the database – bcrypt, scrypt, PBKDF2, SHA with multiple iterations?
  • Allow storing in the browser? Generally “yes”, but some applications deliberately hash it before sending it, so that it can’t be stored automatically
  • Email vs username – do you need a username at all? Should change of email be allowed?
  • Rate-limiting authentication attempts – how many failed logins should block the account, for how long, should admins get notifications or at least logs for locked accounts? Is the limit per IP, per account, a combination of those?
  • Captcha – do you need captcha at all, which one, and after how many attempts? Is Re-Captcha an option?
  • Password reset – password reset token database table or expiring links with HMAC? Rate-limit password reset?
  • SSO – should your service should support LDAP/ActiveDirectory authentication (probably yes), should it support SAML 2.0 or OpenID Connect, and if yes, which ones? Or all of them? Should it ONLY support SSO, rather than internal authentication?
  • 2FA – TOTP or other? Implement the whole 2FA flow, including enable/disable and use or backup codes; add option to not ask for 2FA for a particular device for a period of time? Configuring subset of AD/LDAP users to authenticate based on certain group memberships?
  • Force 2FA by admin configuration – implement time window for activating 2FA after a global option is enabled?
  • Login by link – should the option to send a one-time login link be email be supported?
  • XSS protection – make sure no XSS vulnerabilities exist especially on the login page (but not only, as XSS can steal cookies)
  • Dedicated authentication log – keep a history of all logins, with time, IP, user agent
  • Force logout – is the ability to logout a logged-in device needed, how to implement it, e.g. with stateless tokens it’s not trivial.
  • Keeping a mobile device logged in – what should be stored client-side? (certainly not the password)
  • Working behind proxy – if the client IP matters (it does), make sure the X-Forwarded-For header is parsed
  • Capture login timezone for user and store it in the session to adjust times in the UI?
  • TLS Mutual authentication – if we need to support hardware token authentication with private key, we should enable TLS mutual. What should be in the truststore, does the web server support per-page mutual TLS or should we use a subdomain, if there’s a load balancer / reverse proxy, does it support it and how to forward certificate details?
  • Require account activation or let the user login immediately after registration? Require account approval by back-office staff?
  • Initial password setting for accounts created by admins – generate initial password and force changing it on first login? Don’t generate password and start from a password reset flow?
  • Login anomalies – how to detect them and should you inform the user? Should you rely on 3rd party tools (e.g. a SIEM), or have such functionality built-in?

And that’s for the most obvious feature that every application has. No wonder it has been implemented incorrectly many, many times. The IT world is complex and nothing is simple. Sending email isn’t simple, authentication isn’t simple, logging isn’t simple. Working with strings and dates isn’t simple, sanitizing input and output isn’t simple.

We have done a poor job in building the frameworks and tools to help us with all those things. We can’t really ignore them, we have to think about them actively and take conscious, informed decisions.

The post Simple Things That Are Actually Hard: User Authentication appeared first on Bozho's tech blog.

Как се пише: вездесъщ или въздесъщ?

от Павлина Върбанова
лиценз CC BY-NC-ND
Правилно е да се пише вездесъщ, също и вездесъща, вездесъщо, вездесъщи. Нима не е казано също, че Бог е вездесъщ, всезнаещ и всемогъщ? След полицейските коли веднага се появи открит ландроувър с вездесъщите журналисти.

Как се пише: автомат или афтомат?

от Павлина Върбанова
лиценз CC BY-NC-ND
Правилно е да се пише автомат, мн.ч. автомати. Думата е заета чрез руски (автомат) или немски (Automat) от къснолатински и гръцки. Докато чаках да стане време за срещата, си взех капучино от кафе автомата. Автоматът за затваряне Dorma TS73V е подходящ за по-тежки врати. Електронният стълбищен автомат управлява стълбищното осветление на жилищни сгради и други […]

ЕС: Законодателeн акт за свободата на медиите

от Нели Огнянова
лиценз CC BY

Откривайки European News Media Forum, Комисарят за вътрешния пазар Тиери Бретон  днес потвърди, че се готви Законодателен акт за свободата на медиите:

Европейските граждани търсят надеждна информация, както никога досега. Трябва да отговорим на това търсене и да гарантираме, че гражданите имат достъп до надеждна, качествена и независима информация, включително онлайн.

В отговор Европейската комисия ще представи през следващата година Законодателен акт за свободата на медиите. Целта му ще бъде да гарантира честни и независими медии. Искаме

  • да засилим медийния плурализъм и да подобрим устойчивостта на сектора като цяло,
  • да действаме срещу всякакъв вид неоправдани намеси в дейността на нашите медийни компании,
  • да има предпазни мерки за медиен плурализъм, включително онлайн, така че никой да не може да стане толкова голям, че да не се интересува от публичните дебати,
  • по-сигурно информационно пространство: това е въпрос на европейски суверенитет: както може би сте ме чували да казвам многократно, всичко е геополитическо. Полето на информацията е учебникарски пример за намеса на враждебни чужди участници.

Законодателният акт ще се основава на ревизираната Директива за аудиовизуалните медийни услуги и ще допълни пакета от Законодателния акт за цифровите услуги и неотдавнашната ревизия на правилата за авторско право. По този начин ние изграждаме наистина цялостна медийна политика за цифровата ера.

Ще работим заедно с индустрията, гражданското общество и с държавите-членки и техните регулаторни органи. Скоро ще започнем обществена консултация и искаме да чуем от вас: къде срещате бариери или ограничения в дейността си? Как можем най-добре да ви помогнем да изпълните жизненоважната си роля за нашите демокрации?

Ето какво е казал Бретон през април 2021.

Комисар Вера Йоурова закри  форума. Тя обобщи инициативите, които ЕК ще предприеме през идващата година – като използва законодателни, незаконодателни и финансови инструменти.

Integrity Guarantees of Blockchains In Case of Single Owner Or Colluding Owners

от Божидар Божанов
лиценз CC BY

The title may sound as a paper title, rather than a blogpost, because it was originally an idea for such, but I’m unlikely to find the time to put a proper paper about it, so here it is – a blogpost.

Blockchain has been touted as the ultimate integrity guarantee – if you “have blockchain”, nobody can tamper with your data. Of course, reality is more complicated, and even in the most distributed of ledgers, there are known attacks. But most organizations that are experimenting with blockchain, rely on a private network, sometimes having themselves as the sole owner of the infrastructure, and sometimes sharing it with just a few partners.

The point of having the technology in the first place is to guarantee that once collected, data cannot be tampered with. So let’s review how that works in practice.

First, we have two define two terms – “tamper-resistant” (sometimes referred to as tamper-free) and “tamper-evident”. “Tamper-resistant” means nobody can ever tamper with the data and the state of the data structure is always guaranteed to be without any modifications. “Tamper-evident”, on the other hand, means that a data structure can be validated for integrity violations, and it will be known that there have been modifications (alterations, deletions or back-dating of entries). Therefore, with tamper-evident structures you can prove that the data is intact, but if it’s not intact, you can’t know the original state. It’s still a very important property, as the ability to prove that data is not tampered with is crucial for compliance and legal aspects.

Blockchain is usually built ontop of several main cryptographic primitives: cryptographic hashes, hash chains, Merkle trees, cryptographic timestamps and digital signatures. They all play a role in the integrity guarantees, but the most important ones are the Merkle tree (with all of its variations, like a Patricia Merkle tree) and the hash chain. The original bitcoin paper describes a blockchain to be a hash chain, based on the roots of multiple Merkle trees (which form a single block). Some blockchains rely on a single, ever-growing merkle tree, but let’s not get into particular implementation details.

In all cases, blockchains are considered tamper-resistant because their significantly distributed in a way that enough number of members have a copy of the data. If some node modifies that data, e.g. 5 blocks in the past, it has to prove to everyone else that this is the correct merkle root for that block. You have to have more than 50% of the network capacity in order to do that (and it’s more complicated than just having them), but it’s still possible. In a way, tamper resistance = tamper evidence + distributed data.

But many of the practical applications of blockchain rely on private networks, serving one or several entities. They are often based on proof of authority, which means whoever has access to a set of private keys, controls what the network agree on. So let’s review the two cases:

  • Multiple owners – in case of multiple node owners, several of them can collude to rewrite the chain. The collusion can be based on mutual business interest (e.g. in a supply chain, several members may team up against the producer to report distorted data), or can be based on security compromise (e.g. multiple members are hacked by the same group). In that case, the remaining node owners can have a backup of the original data, but finding out whether the rest were malicious or the changes were legitimate part of the business logic would require a complicated investigation.
  • Single owner – a single owner can have a nice Merkle tree or hash chain, but an admin with access to the underlying data store can regenerate the whole chain and it will look legitimate, while in reality it will be tampered with. Splitting access between multiple admins is one approach (or giving them access to separate nodes, none of whom has access to a majority), but they often drink beer together and collusion is again possible. But more importantly – you can’t prove to a 3rd party that your own employees haven’t colluded under orders from management in order to cover some tracks to present a better picture to a regulator.

In the case of a single owner, you don’t even have a tamper-evident structure – the chain can be fully rewritten and nobody will understand that. In case of multiple owners, it depends on the implementation. There will be a record of the modification at the non-colluding party, but proving which side “cheated” would be next to impossible. Tamper-evidence is only partially achieved, because you can’t prove whose data was modified and whose data hasn’t (you only know that one of the copies has tampered data).

In order to achieve tamper-evident structure with both scenarios is to use anchoring. Checkpoints of the data need to be anchored externally, so that there is a clear record of what has been the state of the chain at different points in time. Before blockchain, the recommended approach was to print it in newspapers (e.g. as an ad) and because it has a large enough circulation, nobody can collect all newspapers and modify the published checkpoint hash. This published hash would be either a root of the Merkle tree, or the latest hash in a hash chain. An ever-growing Merkle tree would allow consistency and inclusion proofs to be validated.

When we have electronic distribution of data, we can use public blockchains to regularly anchor our internal ones, in order to achieve proper tamper-evident data. We, at LogSentinel, for example, do exactly that – we allow publishing the latest Merkle root and the latest hash chain to Ethereum. Then even if those with access to the underlying datastore manage to modify and regenerate the entire chain/tree, there will be no match with the publicly advertised values.

How to store data on publish blockchains is a separate topic. In case of Ethereum, you can put any payload within a transaction, so you can put that hash in low-value transactions between two own addresses (or self-transactions). You can use smart-contracts as well, but that’s not necessary. For Bitcoin, you can use OP_RETURN. Other implementations may have different approaches to storing data within transactions.

If we want to achieve tamper-resistance, we just need to have several copies of the data, all subject to tamper-evidence guarantees. Just as in a public network. But what a public network gives is is a layer, which we can trust with providing us with the necessary piece for achieving local tamper evidence. Of course, going to hardware, it’s easier to have write-only storage (WORM, write once, ready many). The problem with it, is that it’s expensive and that you can’t reuse it. It’s not so much applicable to use-cases that require short-lived data that requires tamper-resistance.

So in summary, in order to have proper integrity guarantees and the ability to prove that the data in a single-owner or multi-owner private blockchains hasn’t been tampered with, we have to send publicly the latest hash of whatever structure we are using (chain or tree). If not, we are only complicating our lives by integrating a complex piece of technology without getting the real benefit it can bring – proving the integrity of our data.

The post Integrity Guarantees of Blockchains In Case of Single Owner Or Colluding Owners appeared first on Bozho's tech blog.

Как се пише: апендицит, апендисит, апандисит или апендисит?

от Павлина Върбанова
лиценз CC BY-NC-ND
Правилно е да се пише апендицит или апандисит. Двете форми са дублетни. Препоръчваме ви да употребявате медицинския термин апендицит. Думата е заета чрез руски или френски от новолатински – appendicitis. При съмнение за остър апендицит/апандисит детето се хоспитализира в клиниката за активно наблюдение. Спорно е съществуването на т.нар. хроничен апендицит/апандисит.

Как се пише: акомпанятор или акомпаниатор?

от Павлина Върбанова
лиценз CC BY-NC-ND
Правилно е да се пише акомпанятор, мн.ч. акомпанятори. Думата е заета от италиански – accompagnatore. Професионалният пианист може да бъде: солист, акомпанятор, пианист в оркестър и т.н. Акомпанятори ще бъдат ученици от класа по клавирен съпровод на Олга Дичева.